27 #ifndef OPAL_IM_MSRP_H
28 #define OPAL_IM_MSRP_H
37 #include <ptclib/url.h>
38 #include <ptclib/inetprot.h>
73 Chunk(
const PString &
id,
unsigned from,
unsigned len)
96 const PString & contentType,
101 const PString & transactionId,
103 const PString fromUrl,
104 const PMIMEInfo & mime,
110 const PString & text,
111 const PString & toUrl,
112 const PString & fromUrl);
115 const PString & toUrl,
116 const PString & fromUrl,
117 const PMIMEInfo & mime);
185 const PURL & localURL,
186 const PURL & remoteURL
193 PSafePtr<OpalMSRPManager::Connection> & connection
226 typedef PNotifierTemplate<IncomingMSRP &>
CallBack;
229 const PURL & localUrl,
230 const PURL & remoteURL,
235 const PURL & localUrl,
236 const PURL & remoteURL
268 static const PCaselessString &
TCP_MSRP();
277 virtual bool Close();
282 virtual SDPMediaDescription * CreateSDPMediaDescription();
307 bool OpenMSRP(
const PURL & remoteUrl);
310 void SetConnection(PSafePtr<OpalMSRPManager::Connection> & conn);
376 #endif // OPAL_HAS_MSRP
378 #endif // OPAL_IM_MSRP_H
bool m_originating
Definition: msrp.h:177
atomic< uint32_t > m_refCount
Definition: msrp.h:178
bool SendREPORT(const PString &chunkId, const PString &toUrl, const PString &fromUrl, const PMIMEInfo &mime)
Definition: manager.h:150
Connection(OpalMSRPManager &manager, const std::string &key, MSRPProtocol *protocol=NULL)
Commands
Definition: msrp.h:61
PNotifierTemplate< IncomingMSRP & > CallBack
Definition: msrp.h:226
bool ReadMessage(int &command, PString &chunkId, PMIMEInfo &mime, PString &body)
bool SendResponse(const PString &chunkId, unsigned response, const PString &text, const PString &toUrl, const PString &fromUrl)
bool SendSEND(const PURL &from, const PURL &to, const PString &text, const PString &contentType, PString &messageId)
std::map< PString, PSafePtr< Connection > > ConnectionInfoMapType
Definition: msrp.h:249
PSafePtr< Connection > m_connection
Definition: msrp.h:216
PString m_id
Definition: msrp.h:83
OpalMSRPManager(OpalManager &opal, WORD port=DefaultPort)
Chunk(const PString &id, unsigned from, unsigned len)
Definition: msrp.h:73
PString m_body
Definition: msrp.h:215
PURL SessionIDToURL(const OpalTransportAddress &addr, const std::string &id)
ChunkList m_chunks
Definition: msrp.h:81
std::vector< Chunk > ChunkList
Definition: msrp.h:80
PString m_contentType
Definition: msrp.h:86
unsigned m_rangeFrom
Definition: msrp.h:77
PURL m_toURL
Definition: msrp.h:85
void RemoveNotifier(const PURL &localUrl, const PURL &remoteURL)
bool GetLocalPort(WORD &port)
PThread * m_listenerThread
Definition: msrp.h:246
OpalManager & GetOpalManager()
Definition: msrp.h:239
CallBackMap m_callBacks
Definition: msrp.h:253
unsigned m_rangeTo
Definition: msrp.h:78
int m_command
Definition: msrp.h:212
void DispatchMessage(IncomingMSRP &incomingMsg)
PTCPSocket m_listenerSocket
Definition: msrp.h:245
unsigned m_length
Definition: msrp.h:87
void SetNotifier(const PURL &localUrl, const PURL &remoteURL, const CallBack ¬ifier)
bool SendChunk(const PString &transactionId, const PString toUrl, const PString fromUrl, const PMIMEInfo &mime, const PString &body)
PSafePtr< Connection > OpenConnection(const PURL &localURL, const PURL &remoteURL)
std::string m_key
Definition: msrp.h:173
std::map< PString, CallBack > CallBackMap
Definition: msrp.h:252
PMIMEInfo m_mime
Definition: msrp.h:214
static const unsigned MaximumMessageLength
Definition: msrp.h:67
std::string CreateSessionID()
PString m_chunkId
Definition: msrp.h:213
WORD m_listenerPort
Definition: msrp.h:243
Definition: connection.h:415
OpalMSRPManager & m_manager
Definition: msrp.h:172
PString m_chunkId
Definition: msrp.h:76
Definition: transports.h:151
MSRPProtocol * m_protocol
Definition: msrp.h:174
PURL m_fromURL
Definition: msrp.h:84
OpalManager & opalManager
Definition: msrp.h:242
PThread * m_handlerThread
Definition: msrp.h:176
bool m_running
Definition: msrp.h:175
ConnectionInfoMapType m_connectionInfoMap
Definition: msrp.h:250
bool CloseConnection(PSafePtr< OpalMSRPManager::Connection > &connection)