linphone::ChatRoomListener Class Reference

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

`#include <chat_room_listener.hh>`

Inheritance diagram for linphone::ChatRoomListener:

## Public Member Functions

virtual LINPHONECXX_PUBLIC void | onIsComposingReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::Address > &remoteAddress, bool isComposing)
| Is composing notification callback prototype.
virtual LINPHONECXX_PUBLIC void | onMessageReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< linphone::ChatMessage > &message)
| Callback used to notify a chat room that a message has been received.
virtual LINPHONECXX_PUBLIC void | onMessagesReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::list< std::shared_ptr< linphone::ChatMessage > > &chatMessages)
| Callback used to notify a chat room that many chat messages have been received.
virtual LINPHONECXX_PUBLIC void | onNewEvent (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that an event log has been created.
virtual LINPHONECXX_PUBLIC void | onNewEvents (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::list< std::shared_ptr< linphone::EventLog > > &eventLogs)
| Callback used to notify a chat room that many event logs have been created.
virtual LINPHONECXX_PUBLIC void | onChatMessageReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a chat message has been received.
virtual LINPHONECXX_PUBLIC void | onChatMessagesReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::list< std::shared_ptr< linphone::EventLog > > &eventLogs)
| Callback used to notify a chat room that one or many chat messages have been received.
virtual LINPHONECXX_PUBLIC void | onChatMessageSending (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a chat message is being sent.
virtual LINPHONECXX_PUBLIC void | onChatMessageSent (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a chat message has been sent.
virtual LINPHONECXX_PUBLIC void | onParticipantAdded (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a participant has been added.
virtual LINPHONECXX_PUBLIC void | onParticipantRemoved (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a participant has been removed.
virtual LINPHONECXX_PUBLIC void | onParticipantAdminStatusChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that the admin status of a participant has been changed.
virtual LINPHONECXX_PUBLIC void | onStateChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, linphone::ChatRoom::State newState)
| Callback used to notify a chat room state has changed.
virtual LINPHONECXX_PUBLIC void | onSecurityEvent (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a security event in the chat room.
virtual LINPHONECXX_PUBLIC void | onSubjectChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify that the subject of a chat room has changed.
virtual LINPHONECXX_PUBLIC void | onUndecryptableMessageReceived (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< linphone::ChatMessage > &message)
| Callback used to notify a chat room that a message has been received but we were unable to decrypt it.
virtual LINPHONECXX_PUBLIC void | onParticipantDeviceAdded (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a participant has been added.
virtual LINPHONECXX_PUBLIC void | onParticipantDeviceRemoved (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that a participant has been removed.
virtual LINPHONECXX_PUBLIC void | onParticipantDeviceStateChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog, linphone::ParticipantDevice::State state)
| Callback used to notify a conference that a participant device has changed state.
virtual LINPHONECXX_PUBLIC void | onParticipantDeviceMediaAvailabilityChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a conference that the media availability of a participant device has been changed.
virtual LINPHONECXX_PUBLIC void | onConferenceJoined (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room has been joined.
virtual LINPHONECXX_PUBLIC void | onConferenceLeft (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room has been left.
virtual LINPHONECXX_PUBLIC void | onEphemeralEvent (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that an ephemeral related event has been generated.
virtual LINPHONECXX_PUBLIC void | onEphemeralMessageTimerStarted (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that the lifespan of an ephemeral message before disappearing has started to decrease.
virtual LINPHONECXX_PUBLIC void | onEphemeralMessageDeleted (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::EventLog > &eventLog)
| Callback used to notify a chat room that an ephemeral message has been deleted.
virtual LINPHONECXX_PUBLIC void | onConferenceAddressGeneration (const std::shared_ptr< linphone::ChatRoom > &chatRoom)
| Callback used when a group chat room is created server-side to generate the address of the chat room.
virtual LINPHONECXX_PUBLIC void | onParticipantRegistrationSubscriptionRequested (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::Address > &participantAddress)
| Callback used when a group chat room server is subscribing to registration state of a participant.
virtual LINPHONECXX_PUBLIC void | onParticipantRegistrationUnsubscriptionRequested (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< const linphone::Address > &participantAddress)
| Callback used when a group chat room server is unsubscribing to registration state of a participant.
virtual LINPHONECXX_PUBLIC void | onChatMessageShouldBeStored (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< linphone::ChatMessage > &message)
| Callback used to tell the core whether or not to store the incoming message in db or not using ChatMessage::setToBeStored().
virtual LINPHONECXX_PUBLIC void | onChatMessageParticipantImdnStateChanged (const std::shared_ptr< linphone::ChatRoom > &chatRoom, const std::shared_ptr< linphone::ChatMessage > &message, const std::shared_ptr< const linphone::ParticipantImdnState > &state)
| Callback used to notify a participant state has changed in a message of this chat room.
virtual LINPHONECXX_PUBLIC void | onChatRoomRead (const std::shared_ptr< linphone::ChatRoom > &chatRoom)
| Callback used to notify a chat room was "marked as read".

## Detailed Description

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

## Member Function Documentation

## onChatMessageParticipantImdnStateChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessageParticipantImdnStateChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< linphone::ChatMessage > & | message,
|  | const std::shared_ptr< const linphone::ParticipantImdnState > & | state )

inline virtual

Callback used to notify a participant state has changed in a message of this chat room.

Parameters

  chatRoom | ChatRoom object
  message | The ChatMessage for which a participant has it's state changed
  state | The ParticipantImdnState

## onChatMessageReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessageReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a chat message has been received.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onChatMessageSending()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessageSending | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a chat message is being sent.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onChatMessageSent()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessageSent | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a chat message has been sent.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onChatMessageShouldBeStored()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessageShouldBeStored | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< linphone::ChatMessage > & | message )

inline virtual

Callback used to tell the core whether or not to store the incoming message in db or not using ChatMessage::setToBeStored().

Parameters

  chatRoom | ChatRoom object
  message | The ChatMessage that is being received

## onChatMessagesReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatMessagesReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::list< std::shared_ptr< linphone::EventLog > > & | eventLogs )

inline virtual

Callback used to notify a chat room that one or many chat messages have been received.

Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using Core::setChatMessagesAggregationEnabled()), it replaces the single chat message received callback.

Parameters

  chatRoom | ChatRoom object
  eventLogs | The list of events to be notified

## onChatRoomRead()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onChatRoomRead | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom | ) |

inline virtual

Callback used to notify a chat room was "marked as read".

Parameters

  chatRoom | The LinphoneChatRoom object that was marked as read

## onConferenceAddressGeneration()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onConferenceAddressGeneration | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom | ) |

inline virtual

Callback used when a group chat room is created server-side to generate the address of the chat room.

The function ChatRoom::setConferenceAddress() needs to be called by this callback.

Parameters

  chatRoom | ChatRoom object

## onConferenceJoined()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onConferenceJoined | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room has been joined.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onConferenceLeft()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onConferenceLeft | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room has been left.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onEphemeralEvent()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onEphemeralEvent | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that an ephemeral related event has been generated.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onEphemeralMessageDeleted()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onEphemeralMessageDeleted | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that an ephemeral message has been deleted.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onEphemeralMessageTimerStarted()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onEphemeralMessageTimerStarted | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that the lifespan of an ephemeral message before disappearing has started to decrease.

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

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onIsComposingReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onIsComposingReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::Address > & | remoteAddress,
|  | bool | isComposing )

inline virtual

Is composing notification callback prototype.

Parameters

  chatRoom | LinphoneChatRoom involved in the conversation
  remoteAddress | The LinphoneAddress that has sent the is-composing notification
  isComposing | A boolean value telling whether the remote is composing or not

## onMessageReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onMessageReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< linphone::ChatMessage > & | message )

inline virtual

Callback used to notify a chat room that a message has been received.

Parameters

  chatRoom | LinphoneChatRoom object
  message | The LinphoneChatMessage that has been received

## onMessagesReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onMessagesReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::list< std::shared_ptr< linphone::ChatMessage > > & | chatMessages )

inline virtual

Callback used to notify a chat room that many chat messages have been received.

Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using linphone_core_set_chat_messages_aggregation_enabled), it replaces the single message received callback.

Parameters

  chatRoom | LinphoneChatRoom object
  chatMessages | The list of events to be notified

## onNewEvent()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onNewEvent | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that an event log has been created.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onNewEvents()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onNewEvents | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::list< std::shared_ptr< linphone::EventLog > > & | eventLogs )

inline virtual

Callback used to notify a chat room that many event logs have been created.

Parameters

  chatRoom | ChatRoom object
  eventLogs | The list of events to be notified

## onParticipantAdded()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantAdded | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a participant has been added.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onParticipantAdminStatusChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantAdminStatusChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that the admin status of a participant has been changed.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onParticipantDeviceAdded()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantDeviceAdded | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a participant has been added.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onParticipantDeviceMediaAvailabilityChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantDeviceMediaAvailabilityChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a conference that the media availability of a participant device has been changed.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onParticipantDeviceRemoved()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantDeviceRemoved | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a participant has been removed.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onParticipantDeviceStateChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantDeviceStateChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog,
|  | linphone::ParticipantDevice::State | state )

inline virtual

Callback used to notify a conference that a participant device has changed state.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified
  state | new participant device state

## onParticipantRegistrationSubscriptionRequested()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantRegistrationSubscriptionRequested | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::Address > & | participantAddress )

inline virtual

Callback used when a group chat room server is subscribing to registration state of a participant.

Parameters

  chatRoom | ChatRoom object
  participantAddress | Address object

## onParticipantRegistrationUnsubscriptionRequested()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantRegistrationUnsubscriptionRequested | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::Address > & | participantAddress )

inline virtual

Callback used when a group chat room server is unsubscribing to registration state of a participant.

Parameters

  chatRoom | ChatRoom object
  participantAddress | Address object

## onParticipantRemoved()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onParticipantRemoved | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a chat room that a participant has been removed.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onSecurityEvent()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onSecurityEvent | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify a security event in the chat room.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onStateChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onStateChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | linphone::ChatRoom::State | newState )

inline virtual

Callback used to notify a chat room state has changed.

Parameters

  chatRoom | LinphoneChatRoom object
  newState | The new LinphoneChatRoomState of the chat room

## onSubjectChanged()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onSubjectChanged | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< const linphone::EventLog > & | eventLog )

inline virtual

Callback used to notify that the subject of a chat room has changed.

Parameters

  chatRoom | ChatRoom object
  eventLog | EventLog The event to be notified

## onUndecryptableMessageReceived()

virtual LINPHONECXX_PUBLIC void linphone::ChatRoomListener::onUndecryptableMessageReceived | ( | const std::shared_ptr< linphone::ChatRoom > & | chatRoom,
|  | const std::shared_ptr< linphone::ChatMessage > & | message )

inline virtual

Callback used to notify a chat room that a message has been received but we were unable to decrypt it.

Parameters

  chatRoom | ChatRoom involved in this conversation
  message | The ChatMessage that has been received

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

- chat_room_listener.hh