OPAL
Version 3.18.8
|
#include <sipim.h>
Public Member Functions | |
OpalSIPIMContext () | |
virtual bool | Open (bool byRemote) |
virtual bool | SendCompositionIndication (const CompositionInfo &info) |
![]() | |
const PString & | GetID () const |
Get conversation ID. More... | |
const PString & | GetKey () const |
Get key for context based on to/from addresses. More... | |
const PURL & | GetRemoteURL () const |
Get remote URL for conversation. More... | |
const PString & | GetRemoteName () const |
Get remote display name for conversation. More... | |
const PURL & | GetLocalURL () const |
Get local URL for conversation. More... | |
const PString & | GetLocalName () const |
Get local display for conversation. More... | |
void | SetLocalName (const PString &name) |
Set local display for conversation. More... | |
PStringOptions & | GetAttributes () |
Get the attributes for this presentity. More... | |
const PStringOptions & | GetAttributes () const |
~OpalIMContext () | |
Destroy context. More... | |
virtual void | Close () |
P_DECLARE_STREAMABLE_ENUM (MessageDisposition, DispositionPending, DispositionAccepted, DeliveryOK, DisplayConfirmed, ProcessedNotification, StorageNotification, DispositionErrors, GenericError, UnacceptableContent, InvalidContent, DestinationUnknown, DestinationUnavailable, TransmissionTimeout, TransportFailure, ConversationClosed, UnsupportedFeature, DeliveryFailed) | |
virtual MessageDisposition | Send (OpalIM *message) |
virtual void | OnMessageDisposition (const DispositionInfo &info) |
void | SetMessageDispositionNotifier (const MessageDispositionNotifier ¬ifier) |
Set the notifier for the OnMessageDisposition() function. More... | |
void | SetMessageReceivedNotifier (const MessageReceivedNotifier ¬ifier) |
Set the notifier for the OnMessageReceived() function. More... | |
virtual void | OnCompositionIndication (const CompositionInfo &info) |
void | SetCompositionIndicationNotifier (const CompositionIndicationNotifier ¬ifier) |
Set the notifier for the OnCompositionIndication() function. More... | |
virtual bool | CheckContentType (const PString &contentType) const |
Check that the context type is valid for protocol. More... | |
virtual PStringArray | GetContentTypes () const |
Return array of all valid content types. More... | |
Static Public Member Functions | |
static void | OnMESSAGECompleted (SIPEndPoint &endpoint, const SIPMessage::Params ¶ms, SIP_PDU::StatusCodes reason) |
static void | OnReceivedMESSAGE (SIPEndPoint &endpoint, SIPConnection *connection, SIP_PDU &pdu) |
![]() | |
static const PCaselessString & | CompositionIndicationActive () |
CompositionIndication active status. More... | |
static const PCaselessString & | CompositionIndicationIdle () |
CompositionIndication idle status. More... | |
static PString | CreateKey (const PURL &from, const PURL &to) |
Calculate a key based on the from an to addresses. More... | |
Protected Member Functions | |
virtual MessageDisposition | InternalSendOutsideCall (OpalIM &message) |
virtual MessageDisposition | InternalSendInsideCall (OpalIM &message) |
virtual MessageDisposition | OnMessageReceived (const OpalIM &message) |
virtual MessageDisposition | InternalOnCompositionIndication (const OpalIM &message) |
virtual MessageDisposition | InternalOnDisposition (const OpalIM &message) |
void | PopulateParams (SIPMessage::Params ¶ms, const OpalIM &message) |
PDECLARE_NOTIFIER (PTimer, OpalSIPIMContext, OnRxCompositionIdleTimer) | |
PDECLARE_NOTIFIER (PTimer, OpalSIPIMContext, OnTxCompositionIdleTimer) | |
![]() | |
void | ResetLastUsed () |
virtual MessageDisposition | InternalSend () |
virtual void | InternalOnMessageSent (const DispositionInfo &info) |
PDECLARE_MUTEX (m_notificationMutex) | |
PDECLARE_MUTEX (m_outgoingMessagesMutex) | |
PDECLARE_MUTEX (m_lastUsedMutex) | |
OpalIMContext () | |
Construct base for context. More... | |
Protected Attributes | |
PString | m_rxCompositionState |
PTimer | m_rxCompositionIdleTimeout |
PString | m_txCompositionState |
PTimer | m_txCompositionIdleTimeout |
PSimpleTimer | m_txCompositionRefreshTimeout |
PTime | m_lastActive |
![]() | |
OpalIMEndPoint * | m_endpoint |
PStringOptions | m_attributes |
PSafePtr< OpalCall > | m_call |
bool | m_weStartedCall |
MessageDispositionNotifier | m_messageDispositionNotifier |
MessageReceivedNotifier | m_messageReceivedNotifier |
CompositionIndicationNotifier | m_compositionIndicationNotifier |
OpalIM * | m_currentOutgoingMessage |
PQueue< OpalIM > | m_outgoingMessages |
PTime | m_lastUsed |
PString | m_conversationId |
PURL | m_localURL |
PString | m_localName |
PURL | m_remoteURL |
PString | m_remoteName |
PString | m_key |
Class representing a SIP Instant Messaging "conversation". This keeps the context for Instant Messages between two SIP entities. As there are, at least, three (and a half) different mechanisms for doing IM between two SIP endpoints these are chose via capabilities selected before calling OpalIMContext::Create()
SIP-IM Indicates RFC 3428 compliant messaging, using the SIP MESSAGE command. This may be done in call or out of call, the latter is the default. The in call mode is used if OpalIMEndPoint::Create() is given an existing SIPConnection in which to exchange messages. T.140 Indicates RFC 4103 compliant messaging, which is T.140 compliant text sent via RTP. This always requires an active connection, so one will be created if needed. MSRP Indicates RFC 4975 compliant messaging.
The selection on the method that is used is dependent on the applications active media formats.
OpalSIPIMContext::OpalSIPIMContext | ( | ) |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented from OpalIMContext.
|
protectedvirtual |
Reimplemented from OpalIMContext.
|
static |
|
protectedvirtual |
Called when an incoming message arrives for this context. Default implementation checks for valid MIME content and then calls the notifier, if set. If no notifier is set, then the OpalManager::OnMessageReceived() function is called.
Reimplemented from OpalIMContext.
|
static |
|
virtual |
Open the context (conversation) Default behaviour simply returns true.
Reimplemented from OpalIMContext.
|
protected |
|
protected |
|
protected |
|
virtual |
Send a composition indication to remote. The text is usually either CompositionIndicationActive() or CompositionIndicationIdle(), howver other extension values may be possible.
Reimplemented from OpalIMContext.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |