Gadgets.rpc (v0.9)

From VZ Developer Wiki
Revision as of 12:38, 29 July 2010 by Seba (talk | contribs) (Created page with '{{NeedsExamples}} <div style="float:right; margin: 0 0 10px 10px;">__TOC__</div> <span style="font-size:150%"><strong>gadgets.rpc</strong></span> Provides operations for making…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This documentation is not completed yet and will be extended by more examples in future.

gadgets.rpc

Provides operations for making remote procedure calls for gadget-to-container, container-to-gadget, and gadget-to-gadget communication.

Methods

gadgets.rpc.call

<static> gadgets.rpc.call(targetId, serviceName, callback, var_args)
Parameters
Name Type Description
targetId String ID of the RPC service provider; empty if calling the parent container
serviceName String Service name to call
callback Function|null Callback function (if any) to process the return value of the RPC request. The callback function will not be called until after the existing callstack has completed execution.
var_args * Parameters for the RPC request
Description
Calls an RPC service.

gadgets.rpc.register

<static> gadgets.rpc.register(serviceName, handler)
Parameters
Name Type Description
serviceName String Service name to register
handler Function Service handler
Description
Registers an RPC service.

gadgets.rpc.registerDefault

<static> gadgets.rpc.registerDefault(handler)
Parameters
Name Type Description
handler Function Service handler
Description
Registers a default service handler to process all unknown remote procedure calls, which fail silently by default.

gadgets.rpc.unregister

<static> gadgets.rpc.unregister(serviceName)
Parameters
Name Type Description
serviceName String Service name to unregister
Description
Unregisters an RPC service.

gadgets.rpc.unregisterDefault

<static> gadgets.rpc.unregisterDefault()
Description
Unregisters the default service handler. Future unknown remote procedure calls will fail silently.



OpenSocial (v0.9)

gadgets

gadgets.io

gadgets.json

gadgets.Prefs

gadgets.util

gadgets.views

gadgets.flash

gadgets.MiniMessage

gadgets.oauth.Popup

gadgets.rpc

gadgets.skins

gadgets.pubsub

gadgets.Tab

gadgets.TabSet

gadgets.window

gadgets.i18n

opensocial

opensocial.Activity

opensocial.Address

opensocial.Album

opensocial.BodyType

opensocial.Collection

opensocial.CreateActivityPriority

opensocial.DataRequest

opensocial.DataResponse

opensocial.Email

opensocial.Enum

opensocial.Environment

opensocial.EscapeType

opensocial.IdSpec

opensocial.MediaItem

opensocial.Message

opensocial.MessageCollection

opensocial.Name

opensocial.NavigationParameters

opensocial.Organization

opensocial.Permission

opensocial.Person

opensocial.Phone

opensocial.ResponseItem

opensocial.Url

osapi.Request

osapi.BatchRequest

osapi.people

osapi.activities

osapi.appdata

osapi.messages

osapi.http