sipXcallLib home page


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

A SipPresenceMonitor is an object that is used for keeping track of the SIP user agents' presence status. More...

#include <SipPresenceMonitor.h>

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

Public Member Functions

 SipPresenceMonitor (SipUserAgent *userAgent, UtlString &domainName, int hostPort, UtlString &configFile, bool toBePublished)
 option to publish for other subscriptions More...
 
virtual ~SipPresenceMonitor ()
 
bool addExtension (UtlString &groupName, Url &contactUrl)
 Add an extension to a group to be monitored. More...
 
bool removeExtension (UtlString &groupName, Url &contactUrl)
 Remove an extension from a group to be monitored. More...
 
void addStateChangeNotifier (const char *fileUrl, StateChangeNotifier *notifier)
 Registered a StateChangeNotifier. More...
 
void removeStateChangeNotifier (const char *fileUrl)
 Unregistered a StateChangeNotifier. More...
 
virtual bool setStatus (const Url &aor, const Status value)
 Set the status value. More...
 

Protected Member Functions

bool addPresenceEvent (UtlString &contact, SipPresenceEvent *presenceEvent)
 Add the contact and presence event to the subscribe list. More...
 
void publishContent (UtlString &contact, SipPresenceEvent *presenceEvent)
 Publish the presence event package to the resource list. More...
 
void notifyStateChange (UtlString &contact, SipPresenceEvent *presenceEvent)
 Send the state change to the notifier. More...
 

Private Member Functions

 SipPresenceMonitor (const SipPresenceMonitor &rSipPresenceMonitor)
 Disabled copy constructor. More...
 
SipPresenceMonitoroperator= (const SipPresenceMonitor &rhs)
 Disabled assignment operator. More...
 

Private Attributes

CallManagermpCallManager
 
SdpCodecFactory mCodecFactory
 
PresenceDialInServermpDialInServer
 
SipUserAgent * mpUserAgent
 
UtlString mDomainName
 
bool mToBePublished
 
OsBSem mLock
 
SipDialogMgr mDialogMgr
 
SipSubscriptionMgr * mpSubscriptionMgr
 
SipSubscribeServerEventHandler mPolicyHolder
 
SipPublishContentMgr mSipPublishContentMgr
 
SipSubscribeServer * mpSubscribeServer
 
UtlHashMap mMonitoredLists
 
UtlHashMap mPresenceEventList
 
UtlHashMap mStateChangeNotifiers
 

Detailed Description

A SipPresenceMonitor is an object that is used for keeping track of the SIP user agents' presence status.

All the presence information is stored in a NOTIFIER so that other clients can subscribe the information via SUBSCRIBE/NOTIFY. Furthermore, if a StateChangeNotifier is registered with SipPresenceMonitor, the state change will also be sent out via the StateChangeNotifier.

Constructor & Destructor Documentation

SipPresenceMonitor ( SipUserAgent *  userAgent,
UtlString &  domainName,
int  hostPort,
UtlString &  configFile,
bool  toBePublished 
)

option to publish for other subscriptions

Parameters
userAgentSip user agent for sending out SUBSCRIBEs and receiving NOTIFYs
domainNamesipX domain name
hostPortHost port
configFileXml formated configuration
~SipPresenceMonitor ( )
virtual
SipPresenceMonitor ( const SipPresenceMonitor rSipPresenceMonitor)
private

Disabled copy constructor.

Member Function Documentation

bool addExtension ( UtlString &  groupName,
Url &  contactUrl 
)

Add an extension to a group to be monitored.

bool addPresenceEvent ( UtlString &  contact,
SipPresenceEvent *  presenceEvent 
)
protected

Add the contact and presence event to the subscribe list.

void addStateChangeNotifier ( const char *  fileUrl,
StateChangeNotifier *  notifier 
)

Registered a StateChangeNotifier.

void notifyStateChange ( UtlString &  contact,
SipPresenceEvent *  presenceEvent 
)
protected

Send the state change to the notifier.

SipPresenceMonitor& operator= ( const SipPresenceMonitor rhs)
private

Disabled assignment operator.

void publishContent ( UtlString &  contact,
SipPresenceEvent *  presenceEvent 
)
protected

Publish the presence event package to the resource list.

bool removeExtension ( UtlString &  groupName,
Url &  contactUrl 
)

Remove an extension from a group to be monitored.

void removeStateChangeNotifier ( const char *  fileUrl)

Unregistered a StateChangeNotifier.

bool setStatus ( const Url &  aor,
const Status  value 
)
virtual

Set the status value.

Member Data Documentation

SdpCodecFactory mCodecFactory
private
SipDialogMgr mDialogMgr
private
UtlString mDomainName
private
OsBSem mLock
private
UtlHashMap mMonitoredLists
private
CallManager* mpCallManager
private
PresenceDialInServer* mpDialInServer
private
SipSubscribeServerEventHandler mPolicyHolder
private
UtlHashMap mPresenceEventList
private
SipSubscribeServer* mpSubscribeServer
private
SipSubscriptionMgr* mpSubscriptionMgr
private
SipUserAgent* mpUserAgent
private
SipPublishContentMgr mSipPublishContentMgr
private
UtlHashMap mStateChangeNotifiers
private
bool mToBePublished
private