OpalIMContext Class Reference

#include <im.h>

Inheritance diagram for OpalIMContext:

[legend]
Collaboration diagram for OpalIMContext:
[legend]

Attributes

PStringOptions & GetAttributes ()
 < Get the attributes for this presentity.
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)
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

Public Types

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

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.
virtual SentStatus OnIncomingIM (OpalIM &message)
void SetIncomingIMNotifier (const IncomingIMNotifier &notifier)
 Set the notifier for the OnIncomingMessage() function.
virtual void OnCompositionIndicationChanged (const PString &state)
void SetCompositionIndicationChangedNotifier (const CompositionIndicationChangedNotifier &notifier)
 Set the notifier for the OnIncomingMessage() function.
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

Data Structures

struct  MessageSentInfo

Member Typedef Documentation

typedef PNotifierTemplate<const PString &> OpalIMContext::CompositionIndicationChangedNotifier

typedef PNotifierTemplate<const OpalIM &> OpalIMContext::IncomingIMNotifier

typedef PNotifierTemplate<const MessageSentInfo &> OpalIMContext::MessageSentNotifier


Member Enumeration Documentation

enum OpalIMContext::SentStatus

Enumerator:
SentOK 
SentPending 
SentAccepted 
SentUnacceptableContent 
SentInvalidContent 
SentConnectionClosed 
SentNoTransport 
SentNoAnswer 
SentDestinationUnknown 
SentFailedGeneric 


Constructor & Destructor Documentation

OpalIMContext::OpalIMContext (  ) 

OpalIMContext::~OpalIMContext (  ) 


Member Function Documentation

virtual bool OpalIMContext::AddIncomingIM ( OpalIM message  )  [virtual]

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

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

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

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

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

const PStringOptions& OpalIMContext::GetAttributes (  )  const [inline]

PStringOptions& OpalIMContext::GetAttributes (  )  [inline]

< Get the attributes for this presentity.

virtual PStringArray OpalIMContext::GetContentTypes (  )  const [virtual]

PString OpalIMContext::GetID (  )  const [inline]

OpalIM* OpalIMContext::GetIncomingMessage (  ) 

PString OpalIMContext::GetKey (  )  const [inline]

PString OpalIMContext::GetLocalURL (  )  const [inline]

PString OpalIMContext::GetRemoteURL (  )  const [inline]

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

virtual SentStatus OpalIMContext::InternalSend (  )  [protected, virtual]

virtual SentStatus OpalIMContext::InternalSendInsideCall ( OpalIM message  )  [protected, virtual]

Reimplemented in OpalSIPIMContext.

virtual SentStatus OpalIMContext::InternalSendOutsideCall ( OpalIM message  )  [protected, virtual]

Reimplemented in OpalSIPIMContext.

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

virtual void OpalIMContext::OnCompositionIndicationTimeout (  )  [virtual]

Reimplemented in OpalSIPIMContext.

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.

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

virtual bool OpalIMContext::OnNewIncomingIM (  )  [virtual]

void OpalIMContext::ResetLastUsed (  ) 

virtual SentStatus OpalIMContext::Send ( OpalIM message  )  [virtual]

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

Reimplemented in OpalSIPIMContext.

void OpalIMContext::SetCompositionIndicationChangedNotifier ( const CompositionIndicationChangedNotifier notifier  ) 

Set the notifier for the OnIncomingMessage() function.

Parameters:
notifier  Notifier to be called by OnIncomingIM()

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

void OpalIMContext::SetIncomingIMNotifier ( const IncomingIMNotifier notifier  ) 

Set the notifier for the OnIncomingMessage() function.

Parameters:
notifier  Notifier to be called by OnIncomingIM()

void OpalIMContext::SetMessageSentNotifier ( const MessageSentNotifier notifier  ) 

Set the notifier for the OnMessageSent() function.

Parameters:
notifier  Notifier to be called by OnIncomingIM()


Friends And Related Function Documentation

friend class OpalIMManager [friend]


Field Documentation

PStringOptions OpalIMContext::m_attributes [protected]

CompositionIndicationChangedNotifier OpalIMContext::m_compositionIndicationChangedNotifier [protected]

PSafePtr<OpalConnection> OpalIMContext::m_connection [protected]

OpalIM* OpalIMContext::m_currentOutgoingMessage [protected]

IncomingIMNotifier OpalIMContext::m_incomingMessageNotifier [protected]

PQueue<OpalIM> OpalIMContext::m_incomingMessages [protected]

PMutex OpalIMContext::m_incomingMessagesMutex [protected]

PTime OpalIMContext::m_lastUsed [protected]

PMutex OpalIMContext::m_lastUsedMutex [protected]

OpalManager* OpalIMContext::m_manager [protected]

MessageSentNotifier OpalIMContext::m_messageSentNotifier [protected]

PMutex OpalIMContext::m_notificationMutex [protected]

PQueue<OpalIM> OpalIMContext::m_outgoingMessages [protected]

PMutex OpalIMContext::m_outgoingMessagesMutex [protected]

PSafePtr<OpalPresentity> OpalIMContext::m_presentity [protected]


The documentation for this class was generated from the following file:
Generated on 14 Aug 2013 for OPAL by  doxygen 1.4.7