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

118 HP-UX C SIP Stack Programmers Guide
Transaction Manager API
TRANSACTION
M
ANAGER API
The TransactionMgr controls the SIP Stack collection of transactions. You use
the Transaction Manager API to register application callbacks with the
SIP Stack and to create new transactions.
TRANSACTION
M
ANAGER CONTROL
The following API functions are provided for TransactionMgr control:
RvSipTranscMgrCreateTransaction()
You use this function to create a new transaction.
RvSipTransactionMgrSetEvHandlers()
You use this function to set event handler (callback function) pointers that are
related to a transaction in the SIP Stack. The Transaction API declares
prototypes for all transaction callback functions. For example:
/*=================================================================*/
typedef void (RVCALLCONV * RvSipTransactionStateChangedEv)(
IN RvSipTranscHandle hTransc,
IN RvSipTranscOwnerHandle hTranscOwner,
IN RvSipTransactionState eState,
IN RvSipTransactionStateChangeReason eReason);
/*===================================================================*/
You can implement any callback you find necessary according to the callback
function prototypes. All transaction callback functions are included in a
structure called RvSipTransactionEvHandlers. This event handler structure is
where you should set your callback function pointers and is given as a parameter
to RvSipTransactionMgrSetEvHandlers(). The transaction notifies you when
the event occurs using the callback functions you implemented.
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.
RvSipTransactionMgrSetMgrEvHandlers()
The TransactionMgr informs the application about events that are not related to
a specific transaction. These events are gathered in the
RvSipTransactionMgrEvHandlers structure. You use the
RvSipTransactionMgrSetMgrEvHandlers() function to set the pointers of your
event handlers in the SIP Stack.