FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kSvNode_SetActionHandler ( kSvNode  node,
kCallbackFx  function,
kPointer  receiver 
)

Registers a custom callback handler for incoming action requests.

Most action objects make use of the same kSystem object that is accessed via the kSvNode_Client function. But if this kSystem object is also used by the application, then a mutual exlusion mechasism should be implemented to prevent simultaneous access. By registering an action handler, the application takes responsibility for performing actions, and can implement custom thread synchronization/exclusion logic as needed.

To process the action, the callback should call kSvNode_PerformAction, passing the 'args' received by the callback as the kSvNode_PerformAction 'args' parameter.

If an action handler is not installed by the application, a default action handler will be used. The default handler will execute actions without performing any special locking/unlocking steps.

Parameters
nodeNode object.
functionCallback function.
receiverCallback receiver.
Returns
Operation status.
See also
kSvNode_PerformAction