im.h
Go to the documentation of this file.
/*
* im_mf.h
*
* Media formats for Instant Messaging
*
* Open Phone Abstraction Library (OPAL)
*
* Copyright (c) 2008 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Post Increment
*
* Contributor(s): ______________________________________.
*
* $Revision: 27149 $
* $Author: rjongbloed $
* $Date: 2012-03-07 18:32:36 -0600 (Wed, 07 Mar 2012) $
*/
#ifndef OPAL_IM_IM_H
#define OPAL_IM_IM_H
#include <ptlib.h>
#include <opal/buildopts.h>
#include <ptclib/url.h>
#include <ptclib/threadpool.h>
#include <opal/transports.h>
class OpalIM : public PObject
{
public:
OpalIM();
enum Type {
Text,
CompositionIndication_Idle, // aka RFC 3994
CompositionIndication_Active, // aka RFC 3994
Disposition // aka RFC 5438
} m_type;
PURL m_to;
PURL m_from;
PString m_fromName;
PString m_mimeType;
PString m_body;
PString m_conversationId;
OpalTransportAddress m_fromAddr;
OpalTransportAddress m_toAddr;
PAtomicInteger::IntegerType m_messageId;
static PAtomicInteger::IntegerType GetNextMessageId();
};
#if OPAL_HAS_IM
#include <opal/mediastrm.h>
#include <im/rfc4103.h>
class OpalIMMediaType : public OpalMediaTypeDefinition
{
public:
OpalIMMediaType(
const char * mediaType,
const char * sdpType
)
: OpalMediaTypeDefinition(mediaType, sdpType, 0, OpalMediaType::DontOffer)
{ }
PString GetRTPEncoding() const { return PString::Empty(); }
RTP_UDP * CreateRTPSession(OpalRTPConnection & , unsigned , bool ) { return NULL; }
virtual bool UsesRTP() const { return false; }
};
class OpalIMManager;
class OpalPresentity;
class OpalIMContext : public PSafeObject
{
PCLASSINFO(OpalIMContext, PSafeObject);
public:
friend class OpalIMManager;
OpalIMContext();
~OpalIMContext();
static PSafePtr<OpalIMContext> Create(
OpalManager & manager,
const PURL & localURL,
const PURL & remoteURL
);
static PSafePtr<OpalIMContext> Create(
OpalManager & manager,
PSafePtr<OpalConnection> conn
);
static PSafePtr<OpalIMContext> Create(
OpalManager & manager,
PSafePtr<OpalPresentity> presentity,
const PURL & remoteURL
);
enum SentStatus {
SentOK,
SentPending,
SentAccepted,
SentUnacceptableContent,
SentInvalidContent,
SentConnectionClosed,
SentNoTransport,
SentNoAnswer,
SentDestinationUnknown,
SentFailedGeneric,
};
// send text message in this conversation
virtual SentStatus Send(OpalIM * message);
virtual SentStatus SendCompositionIndication(bool active = true);
struct MessageSentInfo {
PAtomicInteger::IntegerType messageId;
OpalIMContext::SentStatus status;
};
virtual void OnMessageSent(const MessageSentInfo & info);
typedef PNotifierTemplate<const MessageSentInfo &> MessageSentNotifier;
#define PDECLARE_MessageSentNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const MessageSentInfo &)
#define PCREATE_MessageSentNotifier(fn) PCREATE_NOTIFIER2(fn, const MessageSentInfo &)
void SetMessageSentNotifier(
const MessageSentNotifier & notifier
);
virtual SentStatus OnIncomingIM(OpalIM & message);
typedef PNotifierTemplate<const OpalIM &> IncomingIMNotifier;
#define PDECLARE_IncomingIMNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const OpalIM &)
#define PCREATE_IncomingIMNotifier(fn) PCREATE_NOTIFIER2(fn, const OpalIM &)
void SetIncomingIMNotifier(
const IncomingIMNotifier & notifier
);
virtual void OnCompositionIndicationChanged(const PString & state);
typedef PNotifierTemplate<const PString &> CompositionIndicationChangedNotifier;
#define PDECLARE_CompositionIndicationChangedNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMContext, cls, fn, const PString &)
#define PCREATE_CompositionIndicationChangedNotifier(fn) PCREATE_NOTIFIER2(fn, const PString &)
void SetCompositionIndicationChangedNotifier(
const CompositionIndicationChangedNotifier & notifier
);
virtual bool CheckContentType(const PString & contentType) const;
virtual PStringArray GetContentTypes() const;
// start of internal functions
PString GetID() const { return m_id; }
void SetID(const PString & id) { m_id = id; }
PString GetKey() const { return m_key; }
PString GetLocalURL() const { return m_localURL; }
PString GetRemoteURL() const { return m_remoteURL; }
PStringOptions & GetAttributes() { return m_attributes; }
const PStringOptions & GetAttributes() const { return m_attributes; }
virtual bool OnNewIncomingIM();
virtual bool AddIncomingIM(OpalIM * message);
virtual void OnCompositionIndicationTimeout();
OpalIM * GetIncomingMessage();
virtual void InternalOnMessageSent(const MessageSentInfo & info);
static PString CreateKey(const PString & from, const PString & to);
void ResetLastUsed();
protected:
virtual SentStatus InternalSend();
virtual SentStatus InternalSendOutsideCall(OpalIM * message);
virtual SentStatus InternalSendInsideCall(OpalIM * message);
PMutex m_notificationMutex;
IncomingIMNotifier m_incomingMessageNotifier;
MessageSentNotifier m_messageSentNotifier;
CompositionIndicationChangedNotifier m_compositionIndicationChangedNotifier;
OpalManager * m_manager;
PStringOptions m_attributes;
PSafePtr<OpalConnection> m_connection;
PSafePtr<OpalPresentity> m_presentity;
PMutex m_incomingMessagesMutex;
PQueue<OpalIM> m_incomingMessages;
PMutex m_outgoingMessagesMutex;
OpalIM * m_currentOutgoingMessage;
PQueue<OpalIM> m_outgoingMessages;
PMutex m_lastUsedMutex;
PTime m_lastUsed;
private:
PString m_id, m_localURL, m_remoteURL, m_key;
};
class OpalConnectionIMContext : public OpalIMContext
{
public:
OpalConnectionIMContext();
};
class OpalPresentityIMContext : public OpalIMContext
{
public:
OpalPresentityIMContext();
};
class OpalIMManager : public PObject
{
public:
OpalIMManager(OpalManager & manager);
~OpalIMManager();
class IM_Work;
OpalIMContext::SentStatus OnIncomingMessage(OpalIM * im, PString & conversationId, PSafePtr<OpalConnection> conn = NULL);
void OnCompositionIndicationTimeout(const PString & conversationId);
void AddContext(PSafePtr<OpalIMContext> context);
void RemoveContext(OpalIMContext * context);
void GarbageCollection();
PSafePtr<OpalIMContext> FindContextByIdWithLock(
const PString & key,
PSafetyMode mode = PSafeReadWrite
);
PSafePtr<OpalIMContext> FindContextByNamesWithLock(
const PString & local,
const PString & remote,
PSafetyMode mode = PSafeReadWrite
);
PSafePtr<OpalIMContext> FindContextForMessageWithLock(OpalIM & im, OpalConnection * conn = NULL);
typedef PNotifierTemplate<OpalIMContext &> NewConversationNotifier;
#define PDECLARE_NewConversationNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalIMManager, cls, fn, OpalIMContext &)
#define PCREATE_NewConversationNotifier(fn) PCREATE_NOTIFIER2(fn, OpalIMContext &)
class NewConversationCallBack : public PObject {
public:
NewConversationNotifier m_notifier;
PString m_scheme;
};
void AddNotifier(const NewConversationNotifier & notifier, const PString & scheme);
bool RemoveNotifier(const NewConversationNotifier & notifier, const PString & scheme);
// thread pool declarations
class IM_Work
{
public:
IM_Work(OpalIMManager & mgr, const PString & conversationId);
virtual ~IM_Work();
virtual void Work() = 0;
OpalIMManager & m_mgr;
PString m_conversationId;
};
class NewIncomingIM_Work : public IM_Work
{
public:
NewIncomingIM_Work(OpalIMManager & mgr, const PString & conversationId)
: IM_Work(mgr, conversationId)
{ }
virtual void Work()
{ m_mgr.InternalOnNewIncomingIM(m_conversationId); }
};
class NewConversation_Work : public IM_Work
{
public:
NewConversation_Work(OpalIMManager & mgr, const PString & conversationId)
: IM_Work(mgr, conversationId)
{ }
virtual void Work()
{ m_mgr.InternalOnNewConversation(m_conversationId); }
};
class MessageSent_Work : public IM_Work
{
public:
MessageSent_Work(OpalIMManager & mgr, const PString & conversationId, const OpalIMContext::MessageSentInfo & info)
: IM_Work(mgr, conversationId)
, m_info(info)
{ }
virtual void Work()
{ m_mgr.InternalOnMessageSent(m_conversationId, m_info); }
OpalIMContext::MessageSentInfo m_info;
};
class CompositionIndicationTimeout_Work : public IM_Work
{
public:
CompositionIndicationTimeout_Work(OpalIMManager & mgr, const PString & conversationId)
: IM_Work(mgr, conversationId)
{ }
virtual void Work()
{ m_mgr.InternalOnCompositionIndicationTimeout(m_conversationId); }
};
void AddWork(IM_Work * work);
virtual void InternalOnNewConversation(const PString & conversation);
virtual void InternalOnNewIncomingIM(const PString & conversation);
virtual void InternalOnMessageSent(const PString & conversation, const OpalIMContext::MessageSentInfo & info);
virtual void InternalOnCompositionIndicationTimeout(const PString & conversationId);
protected:
PQueuedThreadPool<IM_Work> m_imThreadPool;
PTime m_lastGarbageCollection;
OpalManager & m_manager;
bool m_deleting;
typedef PSafeDictionary<PString, OpalIMContext> ContextsByConversationId;
ContextsByConversationId m_contextsByConversationId;
PMutex m_contextsByNamesMutex;
typedef std::multimap<std::string, PString> ContextsByNames;
ContextsByNames m_contextsByNames;
PMutex m_notifierMutex;
PList<NewConversationCallBack> m_callbacks;
};
class RTP_IMFrame : public RTP_DataFrame
{
public:
RTP_IMFrame();
RTP_IMFrame(const PString & contentType);
RTP_IMFrame(const PString & contentType, const T140String & content);
RTP_IMFrame(const BYTE * data, PINDEX len, PBoolean dynamic = true);
void SetContentType(const PString & contentType);
PString GetContentType() const;
void SetContent(const T140String & text);
bool GetContent(T140String & text) const;
PString AsString() const { return PString((const char *)GetPayloadPtr(), GetPayloadSize()); }
};
class OpalIMMediaStream : public OpalMediaStream
{
public:
OpalIMMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource
);
virtual PBoolean IsSynchronous() const { return false; }
virtual PBoolean RequiresPatchThread() const { return false; }
bool ReadPacket(RTP_DataFrame & packet);
bool WritePacket(RTP_DataFrame & packet);
protected:
virtual void InternalClose() { }
};
#endif // OPAL_HAS_IM
#endif // OPAL_IM_IM_H
OpalIMManager::IM_Work::~IM_Work
virtual ~IM_Work()
OpalIMContext::GetKey
PString GetKey() const
Definition: im.h:188
OpalIMMediaStream::ReadPacket
bool ReadPacket(RTP_DataFrame &packet)
OpalIMContext::m_outgoingMessages
PQueue< OpalIM > m_outgoingMessages
Definition: im.h:233
RTP_IMFrame::RTP_IMFrame
RTP_IMFrame()
OpalIMManager::AddContext
void AddContext(PSafePtr< OpalIMContext > context)
OpalIMManager::FindContextByIdWithLock
PSafePtr< OpalIMContext > FindContextByIdWithLock(const PString &key, PSafetyMode mode=PSafeReadWrite)
OpalIMManager::~OpalIMManager
~OpalIMManager()
OpalIMContext::GetContentTypes
virtual PStringArray GetContentTypes() const
OpalManager
Definition: manager.h:74
OpalIMContext::CreateKey
static PString CreateKey(const PString &from, const PString &to)
OpalIMContext::m_messageSentNotifier
MessageSentNotifier m_messageSentNotifier
Definition: im.h:219
OpalIMManager::OpalIMManager
OpalIMManager(OpalManager &manager)
OpalRTPConnection
Definition: rtpconn.h:247
OpalIMManager::m_contextsByConversationId
ContextsByConversationId m_contextsByConversationId
Definition: im.h:370
OpalIMManager::FindContextForMessageWithLock
PSafePtr< OpalIMContext > FindContextForMessageWithLock(OpalIM &im, OpalConnection *conn=NULL)
OpalIMContext::InternalSendOutsideCall
virtual SentStatus InternalSendOutsideCall(OpalIM *message)
OpalMediaStream::isSource
bool isSource
Definition: mediastrm.h:421
OpalConnectionIMContext
Definition: im.h:243
OpalIMManager::InternalOnCompositionIndicationTimeout
virtual void InternalOnCompositionIndicationTimeout(const PString &conversationId)
OpalIMManager::AddWork
void AddWork(IM_Work *work)
OpalIM::CompositionIndication_Active
Definition: im.h:50
RTP_IMFrame::AsString
PString AsString() const
Definition: im.h:396
OpalIMContext::OnIncomingIM
virtual SentStatus OnIncomingIM(OpalIM &message)
OpalIMManager::m_lastGarbageCollection
PTime m_lastGarbageCollection
Definition: im.h:366
RTP_IMFrame
Definition: im.h:382
buildopts.h
OpalIMContext::OnCompositionIndicationChanged
virtual void OnCompositionIndicationChanged(const PString &state)
OpalIMMediaStream::OpalIMMediaStream
OpalIMMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
OpalIMContext::OnCompositionIndicationTimeout
virtual void OnCompositionIndicationTimeout()
OpalIMManager::IM_Work::Work
virtual void Work()=0
OpalIMContext::GetRemoteURL
PString GetRemoteURL() const
Definition: im.h:190
OpalIMContext::m_incomingMessages
PQueue< OpalIM > m_incomingMessages
Definition: im.h:229
OpalIMContext::OnMessageSent
virtual void OnMessageSent(const MessageSentInfo &info)
OpalIMContext::SentFailedGeneric
Definition: im.h:131
OpalIMManager::ContextsByConversationId
PSafeDictionary< PString, OpalIMContext > ContextsByConversationId
Definition: im.h:369
OpalIM::Text
Definition: im.h:48
OpalIMContext::SetMessageSentNotifier
void SetMessageSentNotifier(const MessageSentNotifier &notifier)
Set the notifier for the OnMessageSent() function.
OpalIMMediaType::UsesRTP
virtual bool UsesRTP() const
Definition: im.h:86
OpalIM::m_to
PURL m_to
Definition: im.h:54
OpalIMContext::MessageSentInfo::messageId
PAtomicInteger::IntegerType messageId
Definition: im.h:141
OpalIM::Type
Type
Definition: im.h:47
OpalIMMediaType::OpalIMMediaType
OpalIMMediaType(const char *mediaType, const char *sdpType)
Definition: im.h:77
OpalMediaType
Definition: mediatype.h:57
OpalIMContext::GetID
PString GetID() const
Definition: im.h:186
OpalIMContext::SendCompositionIndication
virtual SentStatus SendCompositionIndication(bool active=true)
OpalIMManager::IM_Work::m_mgr
OpalIMManager & m_mgr
Definition: im.h:309
OpalIMManager::RemoveContext
void RemoveContext(OpalIMContext *context)
OpalIMManager::m_callbacks
PList< NewConversationCallBack > m_callbacks
Definition: im.h:377
OpalIMContext::Send
virtual SentStatus Send(OpalIM *message)
OpalIMManager::NewIncomingIM_Work::Work
virtual void Work()
Definition: im.h:319
OpalIMContext::GetLocalURL
PString GetLocalURL() const
Definition: im.h:189
OpalIMManager::NewConversation_Work::Work
virtual void Work()
Definition: im.h:329
OpalIMContext::SentPending
Definition: im.h:123
RTP_IMFrame::SetContent
void SetContent(const T140String &text)
OpalIMContext::SetID
void SetID(const PString &id)
Definition: im.h:187
OpalIMContext::GetIncomingMessage
OpalIM * GetIncomingMessage()
OpalIMManager::InternalOnMessageSent
virtual void InternalOnMessageSent(const PString &conversation, const OpalIMContext::MessageSentInfo &info)
OpalIMManager::CompositionIndicationTimeout_Work::Work
virtual void Work()
Definition: im.h:352
OpalIM
Definition: im.h:42
OpalIMContext::Create
static PSafePtr< OpalIMContext > Create(OpalManager &manager, const PURL &localURL, const PURL &remoteURL)
OpalIMContext::m_lastUsedMutex
PMutex m_lastUsedMutex
Definition: im.h:235
OpalIMMediaType::CreateRTPSession
RTP_UDP * CreateRTPSession(OpalRTPConnection &, unsigned, bool)
Definition: im.h:85
OpalIMContext::m_attributes
PStringOptions m_attributes
Definition: im.h:223
OpalIMManager::OnCompositionIndicationTimeout
void OnCompositionIndicationTimeout(const PString &conversationId)
OpalIMContext::SetCompositionIndicationChangedNotifier
void SetCompositionIndicationChangedNotifier(const CompositionIndicationChangedNotifier &notifier)
Set the notifier for the OnIncomingMessage() function.
rfc4103.h
OpalIMManager::MessageSent_Work::MessageSent_Work
MessageSent_Work(OpalIMManager &mgr, const PString &conversationId, const OpalIMContext::MessageSentInfo &info)
Definition: im.h:336
OpalIMManager::CompositionIndicationTimeout_Work
Definition: im.h:346
OpalIMManager::CompositionIndicationTimeout_Work::CompositionIndicationTimeout_Work
CompositionIndicationTimeout_Work(OpalIMManager &mgr, const PString &conversationId)
Definition: im.h:349
OpalIMContext::SentInvalidContent
Definition: im.h:126
OpalIMContext::GetAttributes
const PStringOptions & GetAttributes() const
Definition: im.h:196
OpalIMContext::m_outgoingMessagesMutex
PMutex m_outgoingMessagesMutex
Definition: im.h:231
OpalIMMediaStream::InternalClose
virtual void InternalClose()
Definition: im.h:416
OpalIMManager::m_contextsByNamesMutex
PMutex m_contextsByNamesMutex
Definition: im.h:372
OpalIMContext::InternalOnMessageSent
virtual void InternalOnMessageSent(const MessageSentInfo &info)
OpalIMManager::MessageSent_Work
Definition: im.h:333
OpalMediaStream::sessionID
unsigned sessionID
Definition: mediastrm.h:417
OpalIM::OpalIM
OpalIM()
RTP_IMFrame::GetContentType
PString GetContentType() const
RTP_DataFrame
Definition: rtp.h:71
OpalIMContext::SentConnectionClosed
Definition: im.h:127
OpalIM::m_from
PURL m_from
Definition: im.h:55
RTP_DataFrame::GetPayloadSize
PINDEX GetPayloadSize() const
Definition: rtp.h:164
OpalIMContext::m_notificationMutex
PMutex m_notificationMutex
Definition: im.h:217
OpalIMContext::m_currentOutgoingMessage
OpalIM * m_currentOutgoingMessage
Definition: im.h:232
OpalIMManager::m_deleting
bool m_deleting
Definition: im.h:368
OpalIMManager::NewConversation_Work
Definition: im.h:323
OpalMediaFormat
Definition: mediafmt.h:724
OpalIM::GetNextMessageId
static PAtomicInteger::IntegerType GetNextMessageId()
OpalIMMediaStream
Definition: im.h:399
OpalIMManager::MessageSent_Work::Work
virtual void Work()
Definition: im.h:340
OpalIMManager::m_manager
OpalManager & m_manager
Definition: im.h:367
OpalIMManager::NewConversationNotifier
PNotifierTemplate< OpalIMContext & > NewConversationNotifier
Definition: im.h:286
OpalIMContext::SentOK
Definition: im.h:122
OpalIMManager::IM_Work
Definition: im.h:301
OpalIMManager::InternalOnNewIncomingIM
virtual void InternalOnNewIncomingIM(const PString &conversation)
OpalIMContext::SentAccepted
Definition: im.h:124
RTP_DataFrame::GetPayloadPtr
BYTE * GetPayloadPtr() const
Definition: rtp.h:166
OpalIM::m_messageId
PAtomicInteger::IntegerType m_messageId
Definition: im.h:64
OpalIMContext::SentNoTransport
Definition: im.h:128
OpalIMMediaType::GetRTPEncoding
PString GetRTPEncoding() const
Definition: im.h:84
OpalIMContext::m_incomingMessagesMutex
PMutex m_incomingMessagesMutex
Definition: im.h:228
OpalIMContext::SetIncomingIMNotifier
void SetIncomingIMNotifier(const IncomingIMNotifier &notifier)
Set the notifier for the OnIncomingMessage() function.
OpalIMContext::MessageSentInfo
Definition: im.h:140
OpalIMContext::IncomingIMNotifier
PNotifierTemplate< const OpalIM & > IncomingIMNotifier
Definition: im.h:159
OpalIM::m_mimeType
PString m_mimeType
Definition: im.h:57
OpalIMContext::SentUnacceptableContent
Definition: im.h:125
OpalIMContext::MessageSentNotifier
PNotifierTemplate< const MessageSentInfo & > MessageSentNotifier
Definition: im.h:146
OpalPresentity
Definition: pres_ent.h:135
OpalIMManager::AddNotifier
void AddNotifier(const NewConversationNotifier &notifier, const PString &scheme)
OpalIMManager::FindContextByNamesWithLock
PSafePtr< OpalIMContext > FindContextByNamesWithLock(const PString &local, const PString &remote, PSafetyMode mode=PSafeReadWrite)
transports.h
OpalIMContext::m_connection
PSafePtr< OpalConnection > m_connection
Definition: im.h:225
OpalIMManager
Definition: im.h:257
OpalIMManager::InternalOnNewConversation
virtual void InternalOnNewConversation(const PString &conversation)
OpalIMManager::m_notifierMutex
PMutex m_notifierMutex
Definition: im.h:376
OpalIM::m_toAddr
OpalTransportAddress m_toAddr
Definition: im.h:62
OpalIMManager::NewConversationCallBack::m_scheme
PString m_scheme
Definition: im.h:293
OpalIMContext::CompositionIndicationChangedNotifier
PNotifierTemplate< const PString & > CompositionIndicationChangedNotifier
Definition: im.h:172
OpalIMManager::NewConversationCallBack::m_notifier
NewConversationNotifier m_notifier
Definition: im.h:292
OpalConnectionIMContext::OpalConnectionIMContext
OpalConnectionIMContext()
OpalPresentityIMContext::OpalPresentityIMContext
OpalPresentityIMContext()
OpalPresentityIMContext
Definition: im.h:249
OpalIM::m_type
enum OpalIM::Type m_type
OpalIMContext::m_lastUsed
PTime m_lastUsed
Definition: im.h:236
OpalIMManager::MessageSent_Work::m_info
OpalIMContext::MessageSentInfo m_info
Definition: im.h:343
OpalIMManager::ContextsByNames
std::multimap< std::string, PString > ContextsByNames
Definition: im.h:373
OpalIMContext::m_manager
OpalManager * m_manager
Definition: im.h:222
OpalIM::m_body
PString m_body
Definition: im.h:58
OpalIMContext::m_presentity
PSafePtr< OpalPresentity > m_presentity
Definition: im.h:226
OpalMediaStream
Definition: mediastrm.h:111
OpalMediaStream::mediaFormat
OpalMediaFormat mediaFormat
Definition: mediastrm.h:419
OpalIMMediaType
Definition: im.h:74
OpalIM::m_fromName
PString m_fromName
Definition: im.h:56
OpalIMManager::IM_Work::m_conversationId
PString m_conversationId
Definition: im.h:310
OpalIMMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
Definition: im.h:409
OpalIMContext::CheckContentType
virtual bool CheckContentType(const PString &contentType) const
OpalConnection
Definition: connection.h:353
OpalIMContext::MessageSentInfo::status
OpalIMContext::SentStatus status
Definition: im.h:142
OpalIMContext::InternalSendInsideCall
virtual SentStatus InternalSendInsideCall(OpalIM *message)
OpalIMContext
Definition: im.h:94
OpalIMContext::InternalSend
virtual SentStatus InternalSend()
OpalIMContext::SentDestinationUnknown
Definition: im.h:130
mediastrm.h
OpalIMManager::NewIncomingIM_Work
Definition: im.h:313
OpalIMManager::NewConversationCallBack
Definition: im.h:290
OpalIMManager::RemoveNotifier
bool RemoveNotifier(const NewConversationNotifier &notifier, const PString &scheme)
OpalIMContext::ResetLastUsed
void ResetLastUsed()
OpalIM::Disposition
Definition: im.h:51
OpalIMManager::NewIncomingIM_Work::NewIncomingIM_Work
NewIncomingIM_Work(OpalIMManager &mgr, const PString &conversationId)
Definition: im.h:316
OpalIM::m_fromAddr
OpalTransportAddress m_fromAddr
Definition: im.h:61
OpalTransportAddress
Definition: transports.h:149
T140String
Definition: t140.h:51
OpalIMContext::OpalIMContext
OpalIMContext()
OpalIMContext::OnNewIncomingIM
virtual bool OnNewIncomingIM()
OpalIMManager::GarbageCollection
void GarbageCollection()
OpalIMContext::m_incomingMessageNotifier
IncomingIMNotifier m_incomingMessageNotifier
Definition: im.h:218
OpalIMContext::m_compositionIndicationChangedNotifier
CompositionIndicationChangedNotifier m_compositionIndicationChangedNotifier
Definition: im.h:220
OpalIMContext::~OpalIMContext
~OpalIMContext()
OpalIMContext::SentStatus
SentStatus
Definition: im.h:121
OpalIM::m_conversationId
PString m_conversationId
Definition: im.h:59
OpalIMContext::SentNoAnswer
Definition: im.h:129
OpalIMManager::m_contextsByNames
ContextsByNames m_contextsByNames
Definition: im.h:374
RTP_IMFrame::GetContent
bool GetContent(T140String &text) const
OpalIMManager::m_imThreadPool
PQueuedThreadPool< IM_Work > m_imThreadPool
Definition: im.h:364
OpalIMManager::NewConversation_Work::NewConversation_Work
NewConversation_Work(OpalIMManager &mgr, const PString &conversationId)
Definition: im.h:326
OpalIMManager::OnIncomingMessage
OpalIMContext::SentStatus OnIncomingMessage(OpalIM *im, PString &conversationId, PSafePtr< OpalConnection > conn=NULL)
OpalIMContext::AddIncomingIM
virtual bool AddIncomingIM(OpalIM *message)
OpalIMMediaStream::RequiresPatchThread
virtual PBoolean RequiresPatchThread() const
Definition: im.h:410
OpalIMContext::GetAttributes
PStringOptions & GetAttributes()
< Get the attributes for this presentity.
Definition: im.h:195
RTP_UDP
Definition: rtp.h:1098
OpalIMManager::IM_Work::IM_Work
IM_Work(OpalIMManager &mgr, const PString &conversationId)
OpalMediaTypeDefinition
Definition: mediatype.h:132
OpalIMMediaStream::WritePacket
bool WritePacket(RTP_DataFrame &packet)
RTP_IMFrame::SetContentType
void SetContentType(const PString &contentType)
OpalIM::CompositionIndication_Idle
Definition: im.h:49