12 #ifndef _SipPublishContentMgr_h_ 13 #define _SipPublishContentMgr_h_ 19 #include <os/OsDefs.h> 20 #include <os/OsMutex.h> 21 #include <utl/UtlDefs.h> 22 #include <utl/UtlHashMap.h> 23 #include <utl/UtlContainableAtomic.h> 111 const char* resourceId,
112 const char* eventTypeKey,
113 const char* eventType,
114 UtlBoolean isDefaultContent);
156 const char* eventType,
166 const char* eventType,
174 const char* eventType);
214 virtual void publish(
const char* resourceId,
215 const char* eventTypeKey,
216 const char* eventType,
219 UtlBoolean noNotify = FALSE);
238 virtual void unpublish(
const char* resourceId,
239 const char* eventTypeKey,
240 const char* eventType);
262 const char* eventTypeKey,
264 int& numContentTypes,
296 virtual UtlBoolean
getContent(
const char* resourceId,
297 const char* eventTypeKey,
298 const char* eventType,
299 const char* acceptHeaderValue,
301 UtlBoolean& isDefaultContent);
320 void* applicationData,
328 void*& applicationData,
338 void getStats(
int& numDefaultContent,
339 int& numDefaultConstructor,
340 int& numResourceSpecificContent,
341 int& numCallbacksRegistered);
352 UtlBoolean buildContentTypesContainer(
const char* acceptHeaderValue,
353 UtlHashMap& contentTypes);
367 OsMutex mPublishMgrMutex;
369 UtlHashMap mContentEntries;
371 UtlHashMap mDefaultContentEntries;
372 UtlHashMap mDefaultContentConstructors;
374 UtlHashMap mEventContentCallbacks;
402 const char* resourceId,
403 const char* eventTypeKey,
404 const char* eventType) = 0;
412 #endif // _SipPublishContentMgr_h_ virtual void unpublish(const char *resourceId, const char *eventTypeKey, const char *eventType)
Remove the content for the given resourceId and eventTypeKey The content bodies are given back so tha...
Definition: SipPublishContentMgr.cpp:273
virtual UtlBoolean getContent(const char *resourceId, const char *eventTypeKey, const char *eventType, const char *acceptHeaderValue, HttpBody *&content, UtlBoolean &isDefaultContent)
Get the content for the given resourceId, eventTypeKey and contentTypes Retrieves the content type id...
Definition: SipPublishContentMgr.cpp:436
virtual UtlBoolean removeContentChangeObserver(const char *eventType, void *&applicationData, SipPublisherContentChangeCallback &callbackFunction)
Remove the current observer for the eventTypeKey If the given callbackFunction does not match the exi...
Definition: SipPublishContentMgr.cpp:388
virtual UtlBoolean setContentChangeObserver(const char *eventType, void *applicationData, SipPublisherContentChangeCallback callbackFunction)
Set the callback which gets invoked whenever the content changes Currently only one observer is allow...
Definition: SipPublishContentMgr.cpp:342
virtual void publishDefault(const char *eventTypeKey, const char *eventType, int numContentTypes, HttpBody *eventContent[])
Provide the default content for the given event type key.
Definition: SipPublishContentMgr.cpp:216
int dumpContents(UtlString &dumpString)
Debug dump list of contents.
Definition: SipPublishContentMgr.cpp:635
void getStats(int &numDefaultContent, int &numDefaultConstructor, int &numResourceSpecificContent, int &numCallbacksRegistered)
Get some debug information.
Definition: SipPublishContentMgr.cpp:544
SipPublishContentMgr()
Default publish container constructor.
Definition: SipPublishContentMgr.cpp:90
Helper class for SipPublishContentMgr.
Definition: SipPublishContentMgr.h:388
virtual void unpublishDefault(const char *eventTypeKey, const char *eventType)
Remove the default content and default content constructor for eventTypeKey.
Definition: SipPublishContentMgr.cpp:334
virtual UtlBoolean getPublished(const char *resourceId, const char *eventTypeKey, int maxContentTypes, int &numContentTypes, HttpBody *eventContent[], SipPublishContentMgrDefaultConstructor **defaultConstructor)
Fetch the published content for a given resourceId/eventTypeKey.
Definition: SipPublishContentMgr.cpp:557
virtual void publish(const char *resourceId, const char *eventTypeKey, const char *eventType, int numContentTypes, HttpBody *eventContent[], UtlBoolean noNotify=FALSE)
Provide the given content for the resource and event type key An application provides content (i...
Definition: SipPublishContentMgr.cpp:125
Class for managing body content to be accepted via PUBLISH or provided in NOTIFY requests.
Definition: SipPublishContentMgr.h:93
class to contain an HTTP body
Definition: HttpBody.h:55
void(* SipPublisherContentChangeCallback)(void *applicationData, const char *resourceId, const char *eventTypeKey, const char *eventType, UtlBoolean isDefaultContent)
Callback used to notify interested applications when content has changed Well behaved applications th...
Definition: SipPublishContentMgr.h:110
virtual ~SipPublishContentMgr()
Destructor.
Definition: SipPublishContentMgr.cpp:104