15 #ifndef _SipSubscribeServer_h_ 16 #define _SipSubscribeServer_h_ 21 #include <os/OsServerTask.h> 22 #include <os/OsDefs.h> 23 #include <os/OsRWMutex.h> 24 #include <utl/UtlString.h> 25 #include <utl/UtlHashMap.h> 112 const char* eventType = NULL);
133 const char* resourceId,
134 const char* eventTypeKey,
135 const char* eventType,
136 UtlBoolean isDefaultContent);
140 const char* eventTypeKey,
141 const char* eventType,
142 UtlBoolean isDefaultContent);
214 UtlBoolean handleSubscribe(
const SipMessage& subscribeRequest);
217 UtlBoolean handleNotifyResponse(
const SipMessage& notifyResponse);
220 UtlBoolean handleExpiration(UtlString* subscribeDialogHandle,
227 void unlockForWrite();
233 void unlockForRead();
239 UtlHashMap mEventDefinitions;
240 OsRWMutex mSubscribeServerMutex;
245 #endif // _SipSubscribeServer_h_ SipPublishContentMgr * getPublishMgr(const UtlString &eventType)
Get the content manager for the given event type.
Definition: SipSubscribeServer.cpp:439
Transaction and Transport manager for SIP stack.
Definition: SipUserAgent.h:157
SipSubscriptionMgr * getSubscriptionMgr(const UtlString &eventType)
Get the subscription manager for the given event type.
Definition: SipSubscribeServer.cpp:459
UtlBoolean isEventTypeEnabled(const UtlString &eventType)
Inquire if the given event type is enabled in the server.
Definition: SipSubscribeServer.cpp:481
static void contentChangeCallback(void *applicationData, const char *resourceId, const char *eventTypeKey, const char *eventType, UtlBoolean isDefaultContent)
Callback invoked by SipPublishContentMgr when content changes.
Definition: SipSubscribeServer.cpp:157
SipSubscribeServer(SipUserAgent &defaultUserAgent, SipPublishContentMgr &defaultContentMgr, SipSubscriptionMgr &defaultSubscriptionMgr, SipSubscribeServerEventHandler &defaultPlugin)
Default Dialog constructor.
Definition: SipSubscribeServer.cpp:102
Specialization of HttpMessage to contain and manipulate SIP messages.
Definition: SipMessage.h:343
UtlBoolean disableEventType(const char *eventType, SipUserAgent *&userAgent, SipPublishContentMgr *&contentMgr, SipSubscribeServerEventHandler *&eventPlugin, SipSubscriptionMgr *&subscriptionMgr)
Tell subscribe server to stop supporting given event type.
Definition: SipSubscribeServer.cpp:307
Top level class for accepting and processing SUBSCRIBE requests.
Definition: SipSubscribeServer.h:102
UtlBoolean enableEventType(const char *eventType, SipUserAgent *userAgent=NULL, SipPublishContentMgr *contentMgr=NULL, SipSubscribeServerEventHandler *eventPlugin=NULL, SipSubscriptionMgr *subscriptionMgr=NULL)
Tell subscribe server to support given event type.
Definition: SipSubscribeServer.cpp:252
SipSubscribeServerEventHandler * getEventHandler(const UtlString &eventType)
Get the event handler for the given eventType.
Definition: SipSubscribeServer.cpp:418
UtlBoolean handleMessage(OsMsg &eventMessage)
Handler for SUBSCRIBE requests, NOTIFY responses and timers.
Definition: SipSubscribeServer.cpp:352
Class for managing body content to be accepted via PUBLISH or provided in NOTIFY requests.
Definition: SipPublishContentMgr.h:93
Class for maintaining SUBSCRIBE dialog information in subscription server.
Definition: SipSubscriptionMgr.h:48
static SipSubscribeServer * buildBasicServer(SipUserAgent &userAgent, const char *eventType=NULL)
Helper utility to build a basic server with default behavior.
Definition: SipSubscribeServer.cpp:69
virtual ~SipSubscribeServer()
Destructor.
Definition: SipSubscribeServer.cpp:124
Class for specializing the handling of SIP Events in SipSubscribeServer.
Definition: SipSubscribeServerEventHandler.h:46
UtlBoolean notifySubscribers(const char *resourceId, const char *eventTypeKey, const char *eventType, UtlBoolean isDefaultContent)
Send a NOTIFY to all subscribers to resource and event state.
Definition: SipSubscribeServer.cpp:170