37 #include <ptclib/url.h>
38 #include <ptclib/threadpool.h>
78 const char * mediaType,
86 virtual bool UsesRTP()
const {
return false; }
104 static PSafePtr<OpalIMContext>
Create(
106 const PURL & localURL,
107 const PURL & remoteURL
110 static PSafePtr<OpalIMContext>
Create(
112 PSafePtr<OpalConnection> conn
115 static PSafePtr<OpalIMContext>
Create(
117 PSafePtr<OpalPresentity> presentity,
118 const PURL & remoteURL
147 #define PDECLARE_MessageSentNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const MessageSentInfo &)
148 #define PCREATE_MessageSentNotifier(fn) PCREATE_NOTIFIER2(fn, const MessageSentInfo &)
160 #define PDECLARE_IncomingIMNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const OpalIM &)
161 #define PCREATE_IncomingIMNotifier(fn) PCREATE_NOTIFIER2(fn, const OpalIM &)
173 #define PDECLARE_CompositionIndicationChangedNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const PString &)
174 #define PCREATE_CompositionIndicationChangedNotifier(fn) PCREATE_NOTIFIER2(fn, const PString &)
186 PString
GetID()
const {
return m_id; }
187 void SetID(
const PString &
id) { m_id = id; }
208 static PString
CreateKey(
const PString & from,
const PString & to);
239 PString m_id, m_localURL, m_remoteURL, m_key;
268 void AddContext(PSafePtr<OpalIMContext> context);
275 PSafetyMode mode = PSafeReadWrite
279 const PString & local,
280 const PString & remote,
281 PSafetyMode mode = PSafeReadWrite
287 #define PDECLARE_NewConversationNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMManager, cls, fn, OpalIMContext &)
288 #define PCREATE_NewConversationNotifier(fn) PCREATE_NOTIFIER2(fn, OpalIMContext &)
307 virtual void Work() = 0;
388 RTP_IMFrame(
const BYTE * data, PINDEX len, PBoolean dynamic =
true);
419 #endif // OPAL_HAS_IM
421 #endif // OPAL_IM_IM_H