OPAL Version 3.10.2
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.
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

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.
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

typedef PNotifierTemplate<const PString &> OpalIMContext::CompositionIndicationChangedNotifier
typedef PNotifierTemplate<const OpalIM &> OpalIMContext::IncomingIMNotifier
typedef PNotifierTemplate<const MessageSentInfo &> OpalIMContext::MessageSentNotifier

Member Enumeration Documentation

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< OpalConnection conn 
) [static]
static PSafePtr<OpalIMContext> OpalIMContext::Create ( OpalManager manager,
const PURL &  localURL,
const PURL &  remoteURL 
) [static]
static PSafePtr<OpalIMContext> OpalIMContext::Create ( OpalManager manager,
PSafePtr< OpalPresentity presentity,
const PURL &  remoteURL 
) [static]
static PString OpalIMContext::CreateKey ( const PString &  from,
const PString &  to 
) [static]
PStringOptions& OpalIMContext::GetAttributes ( ) [inline]

< Get the attributes for this presentity.

References m_attributes.

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

References m_attributes.

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:
notifierNotifier 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:
notifierNotifier to be called by OnIncomingIM()
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

friend class OpalIMManager [friend]

Field Documentation

PStringOptions OpalIMContext::m_attributes [protected]

Referenced by GetAttributes().

PTime OpalIMContext::m_lastUsed [protected]
PMutex OpalIMContext::m_lastUsedMutex [protected]

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