Interface ChatRoomListener

All Known Implementing Classes:
ChatRoomListenerStub

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

  • Method Details

    • onIsComposingReceived

      void onIsComposingReceived(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull 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(@NonNull ChatRoom chatRoom, @NonNull ChatMessage message, @NonNull 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(@NonNull ChatRoom chatRoom)
      Callback used to notify a chat room was "marked as read".

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