HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with Register-Clients 141
Registering Application Callbacks
/*===================================================================*/
typedef void
(RVCALLCONV * RvSipRegClientStateChangedEv)(
IN RvSipRegClientHandle hRegClient,
IN RvSipAppRegClientHandle hAppRegClient,
IN RvSipRegClientState eNewState,
IN RvSipRegClientStateChangeReasonm eReason);
/*===================================================================*/
You can implement any callbacks you find necessary, according to the callback
function prototypes in the Register-Client API. All callback functions are
included in a structure called RvSipRegClientEvHandler. This event handler
structure is where you should set your callback function pointers and is given as
a parameter to RvSipRegClientMgrSetEvHandlers(). The register-client notifies
you when the event occurs using the callback functions you implemented.
If you do not wish to be notified of certain events, enter a NULL value for the
callback functions that manage those events in RvSipRegClientEvHandler.
Although you can set the event handlers at any time, it is customary to set them
immediately after RvSipStackConstruct() so that the application immediately
receives all necessary notifications.
REGISTERING
APPLICATION
C
ALLBACKS
To register an application callback, you must first define the callback according
to the prototype. The following code demonstrates an implementation of the
RvSipEventStateChanged() callback function.