Package org.linphone.core

# Interface ChatRoomListener

All Known Implementing Classes:
  `ChatRoomListenerStub`

public interface ChatRoomListener
An object to handle the callbacks for the handling a `ChatRoom` objects.
Use
invalid reference

    Factory#createChatRoomCbs

to create an instance. Then pass the
object to a `ChatRoom` instance through `ChatRoom.addListener(org.linphone.core.ChatRoomListener)`.

## Method Summary

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

## Method Details

### onIsComposingReceived

void onIsComposingReceived(ChatRoom chatRoom, Address remoteAddress, boolean isComposing)
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

void onMessageReceived(ChatRoom chatRoom, ChatMessage message)
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

void onMessagesReceived(ChatRoom chatRoom, ChatMessage[] chatMessages)
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

void onNewEvent(ChatRoom chatRoom, EventLog eventLog)
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

void onNewEvents(ChatRoom chatRoom, EventLog[] eventLogs)
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

### onChatMessageReceived

void onChatMessageReceived(ChatRoom chatRoom, EventLog eventLog)
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

### onChatMessagesReceived

void onChatMessagesReceived(ChatRoom chatRoom, EventLog[] eventLogs)
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(boolean)`), it replaces the
single chat message received callback.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLogs` - The list of events to be notified

### onChatMessageSending

void onChatMessageSending(ChatRoom chatRoom, EventLog eventLog)
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

void onChatMessageSent(ChatRoom chatRoom, EventLog eventLog)
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

### onParticipantAdded

void onParticipantAdded(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a chat room that a participant has been added.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onParticipantRemoved

void onParticipantRemoved(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a chat room that a participant has been removed.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onParticipantAdminStatusChanged

void onParticipantAdminStatusChanged(ChatRoom chatRoom, EventLog eventLog)
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

### onStateChanged

void onStateChanged(ChatRoom chatRoom, ChatRoom.State newState)
Callback used to notify a chat room state has changed.

Parameters:
  `chatRoom` - LinphoneChatRoom object
  `newState` - The new LinphoneChatRoomState of the chat room

### onSecurityEvent

void onSecurityEvent(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a security event in the chat room.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onSubjectChanged

void onSubjectChanged(ChatRoom chatRoom, EventLog eventLog)
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

void onUndecryptableMessageReceived(ChatRoom chatRoom, ChatMessage message)
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

### onParticipantDeviceAdded

void onParticipantDeviceAdded(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a chat room that a participant has been added.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onParticipantDeviceRemoved

void onParticipantDeviceRemoved(ChatRoom chatRoom, EventLog eventLog)
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

void onParticipantDeviceStateChanged(ChatRoom chatRoom, EventLog eventLog, ParticipantDevice.State state)
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

### onParticipantDeviceMediaAvailabilityChanged

void onParticipantDeviceMediaAvailabilityChanged(ChatRoom chatRoom, EventLog eventLog)
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

### onConferenceJoined

void onConferenceJoined(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a chat room has been joined.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onConferenceLeft

void onConferenceLeft(ChatRoom chatRoom, EventLog eventLog)
Callback used to notify a chat room has been left.

Parameters:
  `chatRoom` - `ChatRoom` object
  `eventLog` - `EventLog` The event to be notified

### onEphemeralEvent

void onEphemeralEvent(ChatRoom chatRoom, EventLog eventLog)
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

### onEphemeralMessageTimerStarted

void onEphemeralMessageTimerStarted(ChatRoom chatRoom, EventLog eventLog)
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

### onEphemeralMessageDeleted

void onEphemeralMessageDeleted(ChatRoom chatRoom, EventLog eventLog)
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

### onConferenceAddressGeneration

void onConferenceAddressGeneration(ChatRoom chatRoom)
Callback used when a group chat room is created server-side to generate the
address of the chat room.
The function `ChatRoom.setConferenceAddress(org.linphone.core.Address)` needs to be called by this
callback.

Parameters:
  `chatRoom` - `ChatRoom` object

### onParticipantRegistrationSubscriptionRequested

void onParticipantRegistrationSubscriptionRequested(ChatRoom chatRoom, Address participantAddress)
Callback used when a group chat room server is subscribing to registration
state of a participant.

Parameters:
  `chatRoom` - `ChatRoom` object
  `participantAddress` - `Address` object

### onParticipantRegistrationUnsubscriptionRequested

void onParticipantRegistrationUnsubscriptionRequested(ChatRoom chatRoom, Address participantAddress)
Callback used when a group chat room server is unsubscribing to registration
state of a participant.

Parameters:
  `chatRoom` - `ChatRoom` object
  `participantAddress` - `Address` object

### onChatMessageShouldBeStored

void onChatMessageShouldBeStored(ChatRoom chatRoom, ChatMessage message)
Callback used to tell the core whether or not to store the incoming message in
db or not using `ChatMessage.setToBeStored(boolean)`.

Parameters:
  `chatRoom` - `ChatRoom` object
  `message` - The `ChatMessage` that is being received

### onChatMessageParticipantImdnStateChanged

void onChatMessageParticipantImdnStateChanged(ChatRoom chatRoom, ChatMessage message, ParticipantImdnState state)
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`

### onChatRoomRead

void onChatRoomRead(ChatRoom chatRoom)
Callback used to notify a chat room was "marked as read".

Parameters:
  `chatRoom` - The LinphoneChatRoom object that was marked as read

### onNewMessageReaction

void onNewMessageReaction(ChatRoom chatRoom, ChatMessage message, ChatMessageReaction reaction)
Callback used to notify a reaction has been received or sent for a given
message.

Parameters:
  `chatRoom` - LinphoneChatRoom object
  `message` - LinphoneChatMessage object for which we received a reaction
  `reaction` - the LinphoneChatMessageReaction reaction that was sent or
  received

### onFullStateReceived

void onFullStateReceived(ChatRoom chatRoom)
Callback used to notify that the full state of the chatroom has been received.

Parameters:
  `chatRoom` - `ChatRoom` object