OPAL
Version 3.14.3
|
#include <im.h>
Data Structures | |
struct | CompositionInfo |
struct | ConversationInfo |
struct | DispositionInfo |
Public Member Functions | |
Member variables | |
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 |
Protected Member Functions | |
void | ResetLastUsed () |
virtual MessageDisposition | InternalSend () |
virtual MessageDisposition | InternalSendOutsideCall (OpalIM &message) |
virtual MessageDisposition | InternalSendInsideCall (OpalIM &message) |
virtual void | InternalOnMessageSent (const DispositionInfo &info) |
Protected Attributes | |
OpalIMEndPoint * | m_endpoint |
PStringOptions | m_attributes |
PSafePtr< OpalCall > | m_call |
bool | m_weStartedCall |
PMutex | m_notificationMutex |
MessageDispositionNotifier | m_messageDispositionNotifier |
MessageReceivedNotifier | m_messageReceivedNotifier |
CompositionIndicationNotifier | m_compositionIndicationNotifier |
PMutex | m_outgoingMessagesMutex |
OpalIM * | m_currentOutgoingMessage |
PQueue< OpalIM > | m_outgoingMessages |
PMutex | m_lastUsedMutex |
PTime | m_lastUsed |
PString | m_conversationId |
PURL | m_localURL |
PString | m_localName |
PURL | m_remoteURL |
PString | m_remoteName |
PString | m_key |
Friends | |
class | OpalIMEndPoint |
class | OpalIMConnection |
Construction | |
OpalIMContext () | |
Construct base for context. More... | |
~OpalIMContext () | |
Destroy context. More... | |
virtual bool | Open (bool byRemote) |
virtual void | Close () |
Message transmit | |
typedef PNotifierTemplate < DispositionInfo > | MessageDispositionNotifier |
Type for disposition notifiers. More... | |
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... | |
Message receipt | |
typedef PNotifierTemplate< OpalIM > | MessageReceivedNotifier |
Type for message received notifiers. More... | |
virtual MessageDisposition | OnMessageReceived (const OpalIM &message) |
void | SetMessageReceivedNotifier (const MessageReceivedNotifier ¬ifier) |
Set the notifier for the OnMessageReceived() function. More... | |
Message composition | |
typedef PNotifierTemplate < CompositionInfo > | CompositionIndicationNotifier |
Type for composition indication notifiers. More... | |
virtual bool | SendCompositionIndication (const CompositionInfo &info) |
virtual void | OnCompositionIndication (const CompositionInfo &info) |
void | SetCompositionIndicationNotifier (const CompositionIndicationNotifier ¬ifier) |
Set the notifier for the OnCompositionIndication() function. More... | |
static const PCaselessString & | CompositionIndicationActive () |
CompositionIndication active status. More... | |
static const PCaselessString & | CompositionIndicationIdle () |
CompositionIndication idle status. More... | |
Support functions | |
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 PString | CreateKey (const PURL &from, const PURL &to) |
Calculate a key based on the from an to addresses. More... | |
Class representing an Instant Messaging "conversation". This keeps the context for Instant Messages between two entities. It is an abstract class whose concrete classes are dependant on the individual protocol being used for the messages. The URL "scheme" field is usually used to distinguish the protocol.
typedef PNotifierTemplate<CompositionInfo> OpalIMContext::CompositionIndicationNotifier |
Type for composition indication notifiers.
typedef PNotifierTemplate<DispositionInfo> OpalIMContext::MessageDispositionNotifier |
Type for disposition notifiers.
typedef PNotifierTemplate<OpalIM> OpalIMContext::MessageReceivedNotifier |
Type for message received notifiers.
|
protected |
Construct base for context.
OpalIMContext::~OpalIMContext | ( | ) |
Destroy context.
|
virtual |
Check that the context type is valid for protocol.
contentType | MIME Content type to check |
|
virtual |
Close the context (conversation) Default behaviour removes the context from the OpalIMEndPoint
|
static |
CompositionIndication active status.
|
static |
CompositionIndication idle status.
|
static |
Calculate a key based on the from an to addresses.
|
inline |
Get the attributes for this presentity.
References m_attributes.
|
inline |
References m_attributes.
|
virtual |
Return array of all valid content types.
|
inline |
Get conversation ID.
References m_conversationId.
|
inline |
Get key for context based on to/from addresses.
References m_key.
|
inline |
Get local display for conversation.
References m_localName.
|
inline |
Get local URL for conversation.
References m_localURL.
|
inline |
Get remote display name for conversation.
References m_remoteName.
|
inline |
Get remote URL for conversation.
References m_remoteURL.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in OpalSIPIMContext.
|
protectedvirtual |
Reimplemented in OpalSIPIMContext.
|
virtual |
Called when the remote composition indication changes state. The default behaviour checks for a notifier and calls that if set.
info | New composition state information |
|
virtual |
Callback indicating the dispostion of a messagesent via Send(). The default behaviour checks for a notifier and calls that if set.
info | Information on the message disposition |
|
virtual |
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.
message | Received message |
Reimplemented in OpalSIPIMContext.
|
virtual |
Open the context (conversation) Default behaviour simply returns true.
byRemote | Context was created by remote (incoming message) |
Reimplemented in OpalSIPIMContext.
OpalIMContext::P_DECLARE_STREAMABLE_ENUM | ( | MessageDisposition | , |
DispositionPending | , | ||
DispositionAccepted | , | ||
DeliveryOK | , | ||
DisplayConfirmed | , | ||
ProcessedNotification | , | ||
StorageNotification | , | ||
DispositionErrors | , | ||
GenericError | , | ||
UnacceptableContent | , | ||
InvalidContent | , | ||
DestinationUnknown | , | ||
DestinationUnavailable | , | ||
TransmissionTimeout | , | ||
TransportFailure | , | ||
ConversationClosed | , | ||
UnsupportedFeature | , | ||
DeliveryFailed | |||
) |
Disposition of message transmission. Get the status of the sent message throughout its life, including how it is handled by teh network, and how it is handled by the remote entity, such as described in RFC5438.
|
protected |
|
virtual |
Send message in this conversation. This is generally asynchronous and will return quickly with the message procesing happening inthe background.
The eventual disposition of the message transmission is indicated via the OnMessageDisposition() function and it's notifier.
The message
parameter should be allocated by the caller and will be destroyed by the context when it is finished with.
message | Message to be sent |
|
virtual |
Send a composition indication to remote. The text is usually either CompositionIndicationActive() or CompositionIndicationIdle(), howver other extension values may be possible.
info | Composition information |
Reimplemented in OpalSIPIMContext.
void OpalIMContext::SetCompositionIndicationNotifier | ( | const CompositionIndicationNotifier & | notifier | ) |
Set the notifier for the OnCompositionIndication() function.
notifier | Notifier to be called by protocol |
|
inline |
Set local display for conversation.
References m_localName.
void OpalIMContext::SetMessageDispositionNotifier | ( | const MessageDispositionNotifier & | notifier | ) |
Set the notifier for the OnMessageDisposition() function.
notifier | Notifier to be called by protocol |
void OpalIMContext::SetMessageReceivedNotifier | ( | const MessageReceivedNotifier & | notifier | ) |
Set the notifier for the OnMessageReceived() function.
notifier | Notifier to be called by protocol |
|
friend |
|
friend |
|
protected |
Referenced by GetAttributes().
|
protected |
|
protected |
|
protected |
Referenced by GetID().
|
protected |
|
protected |
|
protected |
Referenced by GetKey().
|
protected |
|
protected |
|
protected |
Referenced by GetLocalName(), and SetLocalName().
|
protected |
Referenced by GetLocalURL().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetRemoteName().
|
protected |
Referenced by GetRemoteURL().
|
protected |