OPAL  Version 3.10.10
OpalIMContext Class Reference

#include <im.h>

Inheritance diagram for OpalIMContext:
OpalConnectionIMContext OpalPresentityIMContext OpalSIPIMContext

Data Structures

struct  MessageSentInfo
 

Public Types

enum  SentStatus {
  SentOK, SentPending, SentAccepted, SentUnacceptableContent,
  SentInvalidContent, SentConnectionClosed, SentNoTransport, SentNoAnswer,
  SentDestinationUnknown, SentFailedGeneric
}
 
typedef PNotifierTemplate< const MessageSentInfo & > MessageSentNotifier
 
typedef PNotifierTemplate< const OpalIM & > IncomingIMNotifier
 
typedef PNotifierTemplate< const PString & > CompositionIndicationChangedNotifier
 

Public Member Functions

 OpalIMContext ()
 
 ~OpalIMContext ()
 
virtual SentStatus Send (OpalIM *message)
 
virtual SentStatus SendCompositionIndication (bool active=true)
 
virtual void OnMessageSent (const MessageSentInfo &info)
 
void SetMessageSentNotifier (const MessageSentNotifier &notifier)
 Set the notifier for the OnMessageSent() function. More...
 
virtual SentStatus OnIncomingIM (OpalIM &message)
 
void SetIncomingIMNotifier (const IncomingIMNotifier &notifier)
 Set the notifier for the OnIncomingMessage() function. More...
 
virtual void OnCompositionIndicationChanged (const PString &state)
 
void SetCompositionIndicationChangedNotifier (const CompositionIndicationChangedNotifier &notifier)
 Set the notifier for the OnIncomingMessage() function. More...
 
virtual bool CheckContentType (const PString &contentType) const
 
virtual PStringArray GetContentTypes () const
 
PString GetID () const
 
void SetID (const PString &id)
 
PString GetKey () const
 
PString GetLocalURL () const
 
PString GetRemoteURL () const
 

Static Public Member Functions

static PSafePtr< OpalIMContextCreate (OpalManager &manager, const PURL &localURL, const PURL &remoteURL)
 
static PSafePtr< OpalIMContextCreate (OpalManager &manager, PSafePtr< OpalConnection > conn)
 
static PSafePtr< OpalIMContextCreate (OpalManager &manager, PSafePtr< OpalPresentity > presentity, const PURL &remoteURL)
 

Friends

class OpalIMManager
 

Attributes

PMutex m_notificationMutex
 
IncomingIMNotifier m_incomingMessageNotifier
 
MessageSentNotifier m_messageSentNotifier
 
CompositionIndicationChangedNotifier m_compositionIndicationChangedNotifier
 
OpalManagerm_manager
 
PStringOptions m_attributes
 
PSafePtr< OpalConnectionm_connection
 
PSafePtr< OpalPresentitym_presentity
 
PMutex m_incomingMessagesMutex
 
PQueue< OpalIMm_incomingMessages
 
PMutex m_outgoingMessagesMutex
 
OpalIMm_currentOutgoingMessage
 
PQueue< OpalIMm_outgoingMessages
 
PMutex m_lastUsedMutex
 
PTime m_lastUsed
 
PStringOptions & GetAttributes ()
 < Get the attributes for this presentity. More...
 
const PStringOptions & GetAttributes () const
 
virtual bool OnNewIncomingIM ()
 
virtual bool AddIncomingIM (OpalIM *message)
 
virtual void OnCompositionIndicationTimeout ()
 
OpalIMGetIncomingMessage ()
 
virtual void InternalOnMessageSent (const MessageSentInfo &info)
 
void ResetLastUsed ()
 
static PString CreateKey (const PString &from, const PString &to)
 
virtual SentStatus InternalSend ()
 
virtual SentStatus InternalSendOutsideCall (OpalIM *message)
 
virtual SentStatus InternalSendInsideCall (OpalIM *message)
 

Member Typedef Documentation

◆ CompositionIndicationChangedNotifier

typedef PNotifierTemplate<const PString &> OpalIMContext::CompositionIndicationChangedNotifier

◆ IncomingIMNotifier

typedef PNotifierTemplate<const OpalIM &> OpalIMContext::IncomingIMNotifier

◆ MessageSentNotifier

typedef PNotifierTemplate<const MessageSentInfo &> OpalIMContext::MessageSentNotifier

Member Enumeration Documentation

◆ SentStatus

Enumerator
SentOK 
SentPending 
SentAccepted 
SentUnacceptableContent 
SentInvalidContent 
SentConnectionClosed 
SentNoTransport 
SentNoAnswer 
SentDestinationUnknown 
SentFailedGeneric 

Constructor & Destructor Documentation

◆ OpalIMContext()

OpalIMContext::OpalIMContext ( )

◆ ~OpalIMContext()

OpalIMContext::~OpalIMContext ( )

Member Function Documentation

◆ AddIncomingIM()

virtual bool OpalIMContext::AddIncomingIM ( OpalIM message)
virtual

◆ CheckContentType()

virtual bool OpalIMContext::CheckContentType ( const PString &  contentType) const
virtual

◆ Create() [1/3]

static PSafePtr<OpalIMContext> OpalIMContext::Create ( OpalManager manager,
const PURL &  localURL,
const PURL &  remoteURL 
)
static

◆ Create() [2/3]

static PSafePtr<OpalIMContext> OpalIMContext::Create ( OpalManager manager,
PSafePtr< OpalConnection conn 
)
static

◆ Create() [3/3]

static PSafePtr<OpalIMContext> OpalIMContext::Create ( OpalManager manager,
PSafePtr< OpalPresentity presentity,
const PURL &  remoteURL 
)
static

◆ CreateKey()

static PString OpalIMContext::CreateKey ( const PString &  from,
const PString &  to 
)
static

◆ GetAttributes() [1/2]

PStringOptions& OpalIMContext::GetAttributes ( )
inline

< Get the attributes for this presentity.

◆ GetAttributes() [2/2]

const PStringOptions& OpalIMContext::GetAttributes ( ) const
inline

◆ GetContentTypes()

virtual PStringArray OpalIMContext::GetContentTypes ( ) const
virtual

◆ GetID()

PString OpalIMContext::GetID ( ) const
inline

◆ GetIncomingMessage()

OpalIM* OpalIMContext::GetIncomingMessage ( )

◆ GetKey()

PString OpalIMContext::GetKey ( ) const
inline

◆ GetLocalURL()

PString OpalIMContext::GetLocalURL ( ) const
inline

◆ GetRemoteURL()

PString OpalIMContext::GetRemoteURL ( ) const
inline

◆ InternalOnMessageSent()

virtual void OpalIMContext::InternalOnMessageSent ( const MessageSentInfo info)
virtual

◆ InternalSend()

virtual SentStatus OpalIMContext::InternalSend ( )
protectedvirtual

◆ InternalSendInsideCall()

virtual SentStatus OpalIMContext::InternalSendInsideCall ( OpalIM message)
protectedvirtual

Reimplemented in OpalSIPIMContext.

◆ InternalSendOutsideCall()

virtual SentStatus OpalIMContext::InternalSendOutsideCall ( OpalIM message)
protectedvirtual

Reimplemented in OpalSIPIMContext.

◆ OnCompositionIndicationChanged()

virtual void OpalIMContext::OnCompositionIndicationChanged ( const PString &  state)
virtual

Called when the remote composition indication changes state for this context Default implementation calls IncomingIMNotifier, if set, else returns true

◆ OnCompositionIndicationTimeout()

virtual void OpalIMContext::OnCompositionIndicationTimeout ( )
virtual

Reimplemented in OpalSIPIMContext.

◆ OnIncomingIM()

virtual SentStatus OpalIMContext::OnIncomingIM ( OpalIM message)
virtual

Called when an incoming message arrives for this context Default implementation calls IncomingIMNotifier, if set, else returns true

Reimplemented in OpalSIPIMContext.

◆ OnMessageSent()

virtual void OpalIMContext::OnMessageSent ( const MessageSentInfo info)
virtual

◆ OnNewIncomingIM()

virtual bool OpalIMContext::OnNewIncomingIM ( )
virtual

◆ ResetLastUsed()

void OpalIMContext::ResetLastUsed ( )

◆ Send()

virtual SentStatus OpalIMContext::Send ( OpalIM message)
virtual

◆ SendCompositionIndication()

virtual SentStatus OpalIMContext::SendCompositionIndication ( bool  active = true)
virtual

Reimplemented in OpalSIPIMContext.

◆ SetCompositionIndicationChangedNotifier()

void OpalIMContext::SetCompositionIndicationChangedNotifier ( const CompositionIndicationChangedNotifier notifier)

Set the notifier for the OnIncomingMessage() function.

Parameters
notifierNotifier to be called by OnIncomingIM()

◆ SetID()

void OpalIMContext::SetID ( const PString &  id)
inline

◆ SetIncomingIMNotifier()

void OpalIMContext::SetIncomingIMNotifier ( const IncomingIMNotifier notifier)

Set the notifier for the OnIncomingMessage() function.

Parameters
notifierNotifier to be called by OnIncomingIM()

◆ SetMessageSentNotifier()

void OpalIMContext::SetMessageSentNotifier ( const MessageSentNotifier notifier)

Set the notifier for the OnMessageSent() function.

Parameters
notifierNotifier to be called by OnIncomingIM()

Friends And Related Function Documentation

◆ OpalIMManager

friend class OpalIMManager
friend

Field Documentation

◆ m_attributes

PStringOptions OpalIMContext::m_attributes
protected

◆ m_compositionIndicationChangedNotifier

CompositionIndicationChangedNotifier OpalIMContext::m_compositionIndicationChangedNotifier
protected

◆ m_connection

PSafePtr<OpalConnection> OpalIMContext::m_connection
protected

◆ m_currentOutgoingMessage

OpalIM* OpalIMContext::m_currentOutgoingMessage
protected

◆ m_incomingMessageNotifier

IncomingIMNotifier OpalIMContext::m_incomingMessageNotifier
protected

◆ m_incomingMessages

PQueue<OpalIM> OpalIMContext::m_incomingMessages
protected

◆ m_incomingMessagesMutex

PMutex OpalIMContext::m_incomingMessagesMutex
protected

◆ m_lastUsed

PTime OpalIMContext::m_lastUsed
protected

◆ m_lastUsedMutex

PMutex OpalIMContext::m_lastUsedMutex
protected

◆ m_manager

OpalManager* OpalIMContext::m_manager
protected

◆ m_messageSentNotifier

MessageSentNotifier OpalIMContext::m_messageSentNotifier
protected

◆ m_notificationMutex

PMutex OpalIMContext::m_notificationMutex
protected

◆ m_outgoingMessages

PQueue<OpalIM> OpalIMContext::m_outgoingMessages
protected

◆ m_outgoingMessagesMutex

PMutex OpalIMContext::m_outgoingMessagesMutex
protected

◆ m_presentity

PSafePtr<OpalPresentity> OpalIMContext::m_presentity
protected

The documentation for this class was generated from the following file: