11 #ifndef _SipResourceList_h_ 12 #define _SipResourceList_h_ 16 #include <utl/UtlHashMap.h> 21 #include <os/OsDateTime.h> 22 #include <os/OsBSem.h> 29 #define RESOURCE_LIST_CONTENT_TYPE "application/rlmi+xml" 30 #define RESOURCE_LIST_XMLNS "urn:ietf:params:xml:ns:rlmi" 32 #define BEGIN_LIST "<list xmlns=\"urn:ietf:params:xml:ns:rlmi\"" 33 #define END_LIST "</list>\n" 35 #define URI_EQUAL " uri=" 36 #define FULL_STATE_EQUAL " fullState=" 38 #define BEGIN_RESOURCE "<resource uri=" 39 #define END_RESOURCE "</resource>\n" 41 #define BEGIN_NAME "<name>" 42 #define END_NAME "</name>\n" 44 #define BEGIN_INSTANCE "<instance id=" 46 #define STATE_ACTIVE "active" 47 #define STATE_PENDIND "pending" 48 #define STATE_TERMINATED "terminated" 83 virtual unsigned int hash()
const;
85 int compareTo(
const UtlContainable *b)
const;
101 void getName(UtlString& name)
const;
107 UtlString& state)
const;
169 void buildBody()
const;
173 void getEventType(UtlString& type)
const;
176 virtual int getLength()
const;
179 void getListUri(UtlString& uri)
const;
187 virtual void getBytes(
const char** bytes,
196 virtual void getBytes(UtlString* bytes,
209 void insertResource(
Resource* resource);
213 Resource* getResource(UtlString& resourceUri);
219 void insertEvent(UtlContainable* event);
222 UtlContainable* removeEvent(UtlContainable* event);
225 UtlBoolean isEmpty();
233 void parseBody(
const char* bytes);
241 UtlString mFullState;
243 UtlString mEventType;
249 UtlHashMap mResources;
264 #endif // _SipResourceList_h_ void setName(const char *name)
Definition: SipResourceList.cpp:72
void getInstance(UtlString &id, UtlString &state) const
Definition: SipResourceList.cpp:92
void getResourceUri(UtlString &uri) const
Definition: SipResourceList.cpp:66
int compareTo(const UtlContainable *b) const
Definition: SipResourceList.cpp:100
Container for resource element in the resource list.
Definition: SipResourceList.h:63
void getName(UtlString &name) const
Definition: SipResourceList.cpp:78
~Resource()
Destructor.
Definition: SipResourceList.cpp:42
virtual UtlContainableType getContainableType() const
Definition: SipResourceList.cpp:112
class to contain an HTTP body
Definition: HttpBody.h:55
void setInstance(const char *id, const char *state)
Definition: SipResourceList.cpp:84
virtual unsigned int hash() const
Definition: SipResourceList.cpp:106
Resource(const char *uri)
Constructor.
Definition: SipResourceList.cpp:35
Container for MIME type application/rlmi+xml.
Definition: SipResourceList.h:139