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.
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.
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.
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.
virtual LINPHONECXX_PUBLIC std::shared_ptr< linphone::Buffer > | onFileTransferSend (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.
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.
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.
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.
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.
virtual LINPHONECXX_PUBLIC void | onEphemeralMessageDeleted (const std::shared_ptr< linphone::ChatMessage > &message)
| Call back used to notify ephemeral message is deleted.

## 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 | ) |
| inline virtual

Call back used to notify ephemeral message is deleted.

Parameters

  message | LinphoneChatMessage object

## ◆ onEphemeralMessageTimerStarted()

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

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

  message | LinphoneChatMessage 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 )
| inline virtual

File transfer progress indication callback prototype.

Parameters

  message | ChatMessage message from which the body is received.
  content | Content incoming content information
  offset | The number of bytes sent/received since the beginning of the transfer.
  total | The 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 )
| inline virtual

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

  message | ChatMessage message from which the body is received.
  content | Content incoming content information
  buffer | Buffer 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

  message | ChatMessage message from which the body is received.
  content | Content outgoing content
  offset | the offset in the file from where to get the data to be sent
  size | the 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 )
| inline 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

  message | ChatMessage message from which the body is received.
  content | Content outgoing content
  offset | the offset in the file from where to get the data to be sent
  size | the number of bytes expected by the framework
  buffer | A 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 )
| inline virtual

Call back used to notify message delivery status.

Parameters

  message | ChatMessage object
  state | ChatMessage::State

## ◆ onNewMessageReaction()

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

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

Parameters

  message | LinphoneChatMessage object
  reaction | the 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 )
| inline virtual

Call back used to notify participant IMDN state.

Parameters

  message | ChatMessage object
  state | ParticipantImdnState

## ◆ onReactionRemoved()

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

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

Parameters

  message | LinphoneChatMessage object
  address | the LinphoneAddress of the person that removed it's reaction

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

- chat_message_listener.hh