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

430 HP-UX C SIP Stack Programmers Guide
Mid-layer Timer API
HandleError();
}
...
/* Making sure that other threads will not be able to
register. Calling this function is optional*/
RvSipMidPrepareDestruct(g_hMidMgr);
/* You can wait here until all threads
are synchronized */
/* Destructing the Mid-layer */
RvSipMidDestruct(g_hMidMgr);
/* Terminating the Mid-layer environment */
RvSipMidEnd();
}
MID-LAYER TIMER
API
The Mid-layer provides an API that enables the application to set and release
timers. When a timer is set, the application has to provide a callback function
that will later be used by the SIP Stack to notify the application that this timer
has expired.
THREADING
C
ONSIDERATIONS
The application can set timers from any thread. However, timers will always
expire in one of the SIP Stack threads. When the SIP Stack is working in a
single threaded mode, all timers will expire in the context of that thread. When
the SIP Stack is working with processing threads, timers may expire on any of
the contexts of these threads.
TIMER HANDLE Each timer object is identified using a handle. You must supply the timer handle
when using the Timer API. RvSipMidTimerHandle defines a timer object
handle. You receive the Timer handle when the timer is set.
TIMER CONTROL
FUNCTIONS
The following functions supply timer control: