Liblinphone  5.3.0
Public Member Functions | List of all members
linphone::ChatMessageListener Class Referenceabstract

An object to handle the callbacks for the handling a ChatMessage objects. More...

#include <chat_message_listener.hh>

Inheritance diagram for linphone::ChatMessageListener:

Public Member Functions

virtual LINPHONECXX_PUBLIC void onMsgStateChanged (const std::shared_ptr< linphone::ChatMessage > &message, linphone::ChatMessage::State state)
 Call back used to notify message delivery status. More...
 
virtual LINPHONECXX_PUBLIC void onNewMessageReaction (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< const linphone::ChatMessageReaction > &reaction)
 Callback used to notify a reaction has been received or sent for a given message. More...
 
virtual LINPHONECXX_PUBLIC void onReactionRemoved (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< const linphone::Address > &address)
 Callback used to notify a reaction has been removed from a given message. More...
 
virtual LINPHONECXX_PUBLIC void onFileTransferRecv (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< linphone::Content > &content, const std::shared_ptr< const linphone::Buffer > &buffer)
 File transfer receive callback prototype. More...
 
virtual LINPHONECXX_PUBLIC std::shared_ptr< linphone::BufferonFileTransferSend (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< linphone::Content > &content, size_t offset, size_t size)=0
 File transfer send callback prototype. More...
 
virtual LINPHONECXX_PUBLIC void onFileTransferSendChunk (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< linphone::Content > &content, size_t offset, size_t size, const std::shared_ptr< linphone::Buffer > &buffer)
 File transfer send callback prototype. More...
 
virtual LINPHONECXX_PUBLIC void onFileTransferProgressIndication (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< linphone::Content > &content, size_t offset, size_t total)
 File transfer progress indication callback prototype. More...
 
virtual LINPHONECXX_PUBLIC void onParticipantImdnStateChanged (const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< const linphone::ParticipantImdnState > &state)
 Call back used to notify participant IMDN state. More...
 
virtual LINPHONECXX_PUBLIC void onEphemeralMessageTimerStarted (const std::shared_ptr< linphone::ChatMessage > &message)
 Callback used to notify an ephemeral message that its lifespan before disappearing has started to decrease. More...
 
virtual LINPHONECXX_PUBLIC void onEphemeralMessageDeleted (const std::shared_ptr< linphone::ChatMessage > &message)
 Call back used to notify ephemeral message is deleted. More...
 

Detailed Description

An object to handle the callbacks for the handling a ChatMessage objects.

Member Function Documentation

◆ onEphemeralMessageDeleted()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onEphemeralMessageDeleted ( const std::shared_ptr< linphone::ChatMessage > &  message)
inlinevirtual

Call back used to notify ephemeral message is deleted.

Parameters
messageLinphoneChatMessage object

◆ onEphemeralMessageTimerStarted()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onEphemeralMessageTimerStarted ( const std::shared_ptr< linphone::ChatMessage > &  message)
inlinevirtual

Callback used to notify an ephemeral message that its lifespan before disappearing has started to decrease.

This callback is called when the ephemeral message is read by the receiver.

Parameters
messageLinphoneChatMessage object

◆ onFileTransferProgressIndication()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onFileTransferProgressIndication ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< linphone::Content > &  content,
size_t  offset,
size_t  total 
)
inlinevirtual

File transfer progress indication callback prototype.

Parameters
messageChatMessage message from which the body is received.
contentContent incoming content information
offsetThe number of bytes sent/received since the beginning of the transfer.
totalThe total number of bytes to be sent/received.

◆ onFileTransferRecv()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onFileTransferRecv ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< linphone::Content > &  content,
const std::shared_ptr< const linphone::Buffer > &  buffer 
)
inlinevirtual

File transfer receive callback prototype.

This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.

Parameters
messageChatMessage message from which the body is received.
contentContent incoming content information
bufferBuffer holding the received data. Empty buffer means end of file.

◆ onFileTransferSend()

virtual LINPHONECXX_PUBLIC std::shared_ptr<linphone::Buffer> linphone::ChatMessageListener::onFileTransferSend ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< linphone::Content > &  content,
size_t  offset,
size_t  size 
)
pure virtual

File transfer send callback prototype.

This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.

Parameters
messageChatMessage message from which the body is received.
contentContent outgoing content
offsetthe offset in the file from where to get the data to be sent
sizethe number of bytes expected by the framework
Returns
A Buffer object holding the data written by the application. An empty buffer means end of file.
Warning
The returned value isn't used, hence the deprecation!
Deprecated:
17/08/2020 Use LinphoneChatMessageCbsFileTransferSendChunkCb instead.

◆ onFileTransferSendChunk()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onFileTransferSendChunk ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< linphone::Content > &  content,
size_t  offset,
size_t  size,
const std::shared_ptr< linphone::Buffer > &  buffer 
)
inlinevirtual

File transfer send callback prototype.

This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.

Parameters
messageChatMessage message from which the body is received.
contentContent outgoing content
offsetthe offset in the file from where to get the data to be sent
sizethe number of bytes expected by the framework
bufferA Buffer to be filled. Leave it empty when end of file has been reached.

◆ onMsgStateChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onMsgStateChanged ( const std::shared_ptr< linphone::ChatMessage > &  message,
linphone::ChatMessage::State  state 
)
inlinevirtual

Call back used to notify message delivery status.

Parameters
messageChatMessage object
stateChatMessage::State

◆ onNewMessageReaction()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onNewMessageReaction ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< const linphone::ChatMessageReaction > &  reaction 
)
inlinevirtual

Callback used to notify a reaction has been received or sent for a given message.

Parameters
messageLinphoneChatMessage object
reactionthe LinphoneChatMessageReaction reaction that was sent or received

◆ onParticipantImdnStateChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onParticipantImdnStateChanged ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< const linphone::ParticipantImdnState > &  state 
)
inlinevirtual

Call back used to notify participant IMDN state.

Parameters
messageChatMessage object
stateParticipantImdnState

◆ onReactionRemoved()

virtual LINPHONECXX_PUBLIC void linphone::ChatMessageListener::onReactionRemoved ( const std::shared_ptr< linphone::ChatMessage > &  message,
const std::shared_ptr< const linphone::Address > &  address 
)
inlinevirtual

Callback used to notify a reaction has been removed from a given message.

Parameters
messageLinphoneChatMessage object
addressthe LinphoneAddress of the person that removed it's reaction

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