|
FireSync API
|
| 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.
| node | Node object. |
| function | Callback function. |
| receiver | Callback receiver. |