ChatRoomDelegate

public protocol ChatRoomDelegate : AnyObject

Undocumented

  • Is composing notification callback prototype.

    Default Implementation

    Declaration

    Swift

    func onIsComposingReceived(chatRoom: ChatRoom, remoteAddress: Address, isComposing: Bool)

    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(chatRoom:message:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onMessageReceived(chatRoom: ChatRoom, message: ChatMessage)

    Parameters

    chatRoom

    LinphoneChatRoom object

    message

    The LinphoneChatMessage that has been received

  • onNewEvent(chatRoom:eventLog:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onNewEvent(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onChatMessageReceived(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onChatMessageSending(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • onChatMessageSent(chatRoom:eventLog:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onChatMessageSent(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onParticipantAdded(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onParticipantRemoved(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onParticipantAdminStatusChanged(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • onStateChanged(chatRoom:newState:) Default implementation

    Callback used to notify a chat room state has changed.

    Default Implementation

    Declaration

    Swift

    func onStateChanged(chatRoom: ChatRoom, newState: ChatRoom.State)

    Parameters

    chatRoom

    LinphoneChatRoom object

    newState

    The new LinphoneChatRoomState of the chat room

  • onSecurityEvent(chatRoom:eventLog:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onSecurityEvent(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • onSubjectChanged(chatRoom:eventLog:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onSubjectChanged(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onUndecryptableMessageReceived(chatRoom: ChatRoom, message: ChatMessage)

    Parameters

    chatRoom

    LinphoneChatRoom involved in this conversation

    message

    The LinphoneChatMessage that has been received

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

    Default Implementation

    Declaration

    Swift

    func onParticipantDeviceAdded(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onParticipantDeviceRemoved(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • Callback used to notify a chat room has been joined.

    Default Implementation

    Declaration

    Swift

    func onConferenceJoined(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • onConferenceLeft(chatRoom:eventLog:) Default implementation

    Callback used to notify a chat room has been left.

    Default Implementation

    Declaration

    Swift

    func onConferenceLeft(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • onEphemeralEvent(chatRoom:eventLog:) Default implementation

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

    Default Implementation

    Declaration

    Swift

    func onEphemeralEvent(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • 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.

    Default Implementation

    Declaration

    Swift

    func onEphemeralMessageTimerStarted(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

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

    Default Implementation

    Declaration

    Swift

    func onEphemeralMessageDeleted(chatRoom: ChatRoom, eventLog: EventLog)

    Parameters

    chatRoom

    LinphoneChatRoom object

    eventLog

    LinphoneEventLog The event to be notified

  • Callback used when a group chat room is created server-side to generate the address of the chat room. The function linphone_chat_room_set_conference_address needs to be called by this callback.

    Default Implementation

    Declaration

    Swift

    func onConferenceAddressGeneration(chatRoom: ChatRoom)

    Parameters

    chatRoom

    LinphoneChatRoom object

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

    Default Implementation

    Declaration

    Swift

    func onParticipantRegistrationSubscriptionRequested(chatRoom: ChatRoom, participantAddress: Address)

    Parameters

    chatRoom

    LinphoneChatRoom object

    participantAddress

    LinphoneAddress object

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

    Default Implementation

    Declaration

    Swift

    func onParticipantRegistrationUnsubscriptionRequested(chatRoom: ChatRoom, participantAddress: Address)

    Parameters

    chatRoom

    LinphoneChatRoom object

    participantAddress

    LinphoneAddress object

  • Callback used to tell the core whether or not to store the incoming message in db or not using linphone_chat_message_set_to_be_stored.

    Default Implementation

    Declaration

    Swift

    func onChatMessageShouldBeStored(chatRoom: ChatRoom, message: ChatMessage)

    Parameters

    chatRoom

    LinphoneChatRoom object

    message

    The LinphoneChatMessage that is being received

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

    Default Implementation

    Declaration

    Swift

    func onChatMessageParticipantImdnStateChanged(chatRoom: ChatRoom, message: ChatMessage, state: ParticipantImdnState)

    Parameters

    chatRoom

    LinphoneChatRoom object

    message

    The LinphoneChatMessage for which a participant has it’s state changed

    state

    The LinphoneParticipantImdnState