sipXcallLib home page


Public Member Functions | Static Protected Member Functions | Private Attributes | List of all members
SipXEventDispatcher Class Reference

The SipXEventDispatcher adds a listener to sipXtapi and then redispatches all of the sipXtapi events on its own callback. More...

#include <SipXEventDispatcher.h>

Inheritance diagram for SipXEventDispatcher:
Inheritance graph
[legend]
Collaboration diagram for SipXEventDispatcher:
Collaboration graph
[legend]

Public Member Functions

 SipXEventDispatcher (SIPX_INST hInst)
 
virtual ~SipXEventDispatcher (void)
 
UtlBoolean handleMessage (OsMsg &rMsg)
 Implementation of OsServerTask's pure virtual method. More...
 
bool addListener (SIPX_EVENT_CALLBACK_PROC pCallbackProc, void *pUserData)
 
bool removeListener (SIPX_EVENT_CALLBACK_PROC pCallbackProc, void *pUserData)
 
void removeAllListeners ()
 
void serviceListeners (SIPX_EVENT_CATEGORY category, void *pInfo)
 
void setInstanceHandle (SIPX_INST hNew)
 

Static Protected Member Functions

static bool SIPX_CALLING_CONVENTION EventCallBack (SIPX_EVENT_CATEGORY category, void *pInfo, void *pUserData)
 

Private Attributes

SIPX_INST mhInst
 
UtlHashMap mListeners
 
OsRWMutex mListenerLock
 

Detailed Description

The SipXEventDispatcher adds a listener to sipXtapi and then redispatches all of the sipXtapi events on its own callback.

Ideally, this should be part of sipXtapi – however, I don't want to change the behavior at this time. Also, solutions for the TODOs below are needed.

TODO:

Constructor & Destructor Documentation

~SipXEventDispatcher ( void  )
virtual

Member Function Documentation

bool addListener ( SIPX_EVENT_CALLBACK_PROC  pCallbackProc,
void *  pUserData 
)
bool SIPX_CALLING_CONVENTION EventCallBack ( SIPX_EVENT_CATEGORY  category,
void *  pInfo,
void *  pUserData 
)
staticprotected
UtlBoolean handleMessage ( OsMsg &  rMsg)

Implementation of OsServerTask's pure virtual method.

void removeAllListeners ( )
bool removeListener ( SIPX_EVENT_CALLBACK_PROC  pCallbackProc,
void *  pUserData 
)
void serviceListeners ( SIPX_EVENT_CATEGORY  category,
void *  pInfo 
)
void setInstanceHandle ( SIPX_INST  hNew)

Member Data Documentation

SIPX_INST mhInst
private
OsRWMutex mListenerLock
private
UtlHashMap mListeners
private