qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Signals | Public Member Functions | List of all members
IMessageDispatcher Class Referenceabstract

#include <imessagedispatcher.h>

Inheritance diagram for IMessageDispatcher:
Inheritance graph
Collaboration diagram for IMessageDispatcher:
Collaboration graph

Signals

void messageReceived (const ToxPk &sender, const Message &message)
 Emitted when a message is received and processed. More...
 
void messageSent (DispatchedMessageId id, const Message &message)
 Emitted when a message is processed and sent. More...
 
void messageComplete (DispatchedMessageId id)
 Emitted when a receiver report is received from the associated chat. More...
 
void messageBroken (DispatchedMessageId id, BrokenMessageReason reason)
 

Public Member Functions

virtual ~IMessageDispatcher ()=default
 
virtual std::pair< DispatchedMessageId, DispatchedMessageIdsendMessage (bool isAction, const QString &content)=0
 Sends message to associated chat. More...
 
virtual std::pair< DispatchedMessageId, DispatchedMessageIdsendExtendedMessage (const QString &content, ExtensionSet extensions)=0
 Sends message to associated chat ensuring that extensions are available. More...
 

Detailed Description

Definition at line 34 of file imessagedispatcher.h.

Constructor & Destructor Documentation

◆ ~IMessageDispatcher()

virtual IMessageDispatcher::~IMessageDispatcher ( )
virtualdefault

Member Function Documentation

◆ messageBroken

void IMessageDispatcher::messageBroken ( DispatchedMessageId  id,
BrokenMessageReason  reason 
)
signal
Here is the caller graph for this function:

◆ messageComplete

void IMessageDispatcher::messageComplete ( DispatchedMessageId  id)
signal

Emitted when a receiver report is received from the associated chat.

Parameters
idId of message that is completed
Here is the caller graph for this function:

◆ messageReceived

void IMessageDispatcher::messageReceived ( const ToxPk sender,
const Message message 
)
signal

Emitted when a message is received and processed.

Here is the caller graph for this function:

◆ messageSent

void IMessageDispatcher::messageSent ( DispatchedMessageId  id,
const Message message 
)
signal

Emitted when a message is processed and sent.

Parameters
idmessage id for completion
messagesent message
Here is the caller graph for this function:

◆ sendExtendedMessage()

virtual std::pair<DispatchedMessageId, DispatchedMessageId> IMessageDispatcher::sendExtendedMessage ( const QString &  content,
ExtensionSet  extensions 
)
pure virtual

Sends message to associated chat ensuring that extensions are available.

Parameters
[in]contentMessage content
[in]extensionsextensions required for given message
Returns
Pair of first and last dispatched message IDs
Note
If the provided extensions are not supported the message will be flagged as broken

Implemented in GroupMessageDispatcher, and FriendMessageDispatcher.

Here is the caller graph for this function:

◆ sendMessage()

virtual std::pair<DispatchedMessageId, DispatchedMessageId> IMessageDispatcher::sendMessage ( bool  isAction,
const QString &  content 
)
pure virtual

Sends message to associated chat.

Parameters
[in]isActionTrue if is action message
[in]contentMessage content
Returns
Pair of first and last dispatched message IDs

Implemented in GroupMessageDispatcher, and FriendMessageDispatcher.

Here is the caller graph for this function:

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