HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

Working with Call-legs (Dialogs) 61
Call-Leg Manager API
if (eState == RVSIP_CALL_LEG_STATE_OFFERING)
{
RvSipCallLegAccept(hCallLeg);
}
}
/*===================================================================================*/
The following steps describe how to register your application callbacks.
To register application callbacks
1. Declare a RvSipCallLegEvHandlers structure.
2. Initialize all the structure members to NULL using memset().
3. Set the application defined callback in
RvSipCallLegEvHandlers.
4. Call RvSipCallLegMgrSetEvHandlers().
Sample Code
The following code demonstrates an application implementation of callback
registration:
/*==================================================================================*/
void SetCallLegEvHandlers(RvSipCallLegMgrHandle hMgr)
{
/*step 1*/
RvSipCallLegEvHandlers appEvHandlers;
/*step 2*/
memset(&appEvHandlers, 0, sizeof
(RvSipCallLegEvHandlers));
/*step 3*/
appEvHandlers.pfnCallLegCreatedEvHandler = AppCallLegCreatedEvHandler;
appEvHandlers.pfnStateChangedEvHandler = AppStateChangedEvHandler;
/*step 4*/
RvSipCallLegMgrSetEvHandlers(hMgr,
&appEvHandlers,
sizeof(appEvHandlers));
}