ChatRoomDelegate
public protocol ChatRoomDelegate : AnyObject
-
onIsComposingReceived(chatRoom:Default implementationremoteAddress: isComposing: ) Is composing notification callback prototype.
Default Implementation
Declaration
Parameters
chatRoomLinphoneChatRoom involved in the conversation
remoteAddressThe LinphoneAddress that has sent the is-composing notification
isComposingA boolean value telling whether the remote is composing or not
-
onMessageReceived(chatRoom:Default implementationmessage: ) Callback used to notify a chat room that a message has been received.
Default Implementation
Declaration
Swift
func onMessageReceived(chatRoom: ChatRoom, message: ChatMessage)Parameters
chatRoomLinphoneChatRoom object
messageThe LinphoneChatMessage that has been received
-
onMessagesReceived(chatRoom:Default implementationchatMessages: ) 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.
Default Implementation
Declaration
Swift
func onMessagesReceived(chatRoom: ChatRoom, chatMessages: [ChatMessage])Parameters
chatRoomLinphoneChatRoom object
chatMessagesThe list of events to be notified
-
onNewEvent(chatRoom:Default implementationeventLog: ) -
onNewEvents(chatRoom:Default implementationeventLogs: ) -
onChatMessageReceived(chatRoom:Default implementationeventLog: ) -
onChatMessagesReceived(chatRoom:Default implementationeventLogs: ) 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 linphone_core_set_chat_messages_aggregation_enabled), it replaces the single chat message received callback.
Default Implementation
Parameters
chatRoomLinphoneChatRoom object
eventLogsThe list of events to be notified
-
onChatMessageSending(chatRoom:Default implementationeventLog: ) -
onChatMessageSent(chatRoom:Default implementationeventLog: ) -
onParticipantAdded(chatRoom:Default implementationeventLog: ) -
onParticipantRemoved(chatRoom:Default implementationeventLog: ) -
onParticipantAdminStatusChanged(chatRoom:Default implementationeventLog: ) Callback used to notify a chat room that the admin status of a participant has been changed.
Default Implementation
Parameters
chatRoomLinphoneChatRoom object
eventLogLinphoneEventLog The event to be notified
-
onStateChanged(chatRoom:Default implementationnewState: ) -
onSecurityEvent(chatRoom:Default implementationeventLog: ) -
onSubjectChanged(chatRoom:Default implementationeventLog: ) -
onUndecryptableMessageReceived(chatRoom:Default implementationmessage: ) 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
chatRoomLinphoneChatRoom involved in this conversation
messageThe LinphoneChatMessage that has been received
-
onParticipantDeviceAdded(chatRoom:Default implementationeventLog: ) -
onParticipantDeviceRemoved(chatRoom:Default implementationeventLog: ) -
onParticipantDeviceStateChanged(chatRoom:Default implementationeventLog: state: ) Callback used to notify a conference that a participant device has changed state.
Default Implementation
Declaration
Swift
func onParticipantDeviceStateChanged(chatRoom: ChatRoom, eventLog: EventLog, state: ParticipantDeviceState)Parameters
chatRoomLinphoneChatRoom object
eventLogLinphoneEventLog The event to be notified
statenew participant device state
-
onParticipantDeviceMediaAvailabilityChanged(chatRoom:Default implementationeventLog: ) Callback used to notify a conference that the media availability of a participant device has been changed.
Default Implementation
Declaration
Parameters
chatRoomLinphoneChatRoom object
eventLogLinphoneEventLog The event to be notified
-
onConferenceJoined(chatRoom:Default implementationeventLog: ) -
onConferenceLeft(chatRoom:Default implementationeventLog: ) -
onEphemeralEvent(chatRoom:Default implementationeventLog: ) -
onEphemeralMessageTimerStarted(chatRoom:Default implementationeventLog: ) 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
Parameters
chatRoomLinphoneChatRoom object
eventLogLinphoneEventLog The event to be notified
-
onEphemeralMessageDeleted(chatRoom:Default implementationeventLog: ) -
onConferenceAddressGeneration(chatRoom:Default implementation) 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
chatRoomLinphoneChatRoom object
-
onParticipantRegistrationSubscriptionRequested(chatRoom:Default implementationparticipantAddress: ) Callback used when a group chat room server is subscribing to registration state of a participant.
Default Implementation
Declaration
Parameters
chatRoomLinphoneChatRoom object
participantAddressLinphoneAddress object
-
onParticipantRegistrationUnsubscriptionRequested(chatRoom:Default implementationparticipantAddress: ) Callback used when a group chat room server is unsubscribing to registration state of a participant.
Default Implementation
Declaration
Parameters
chatRoomLinphoneChatRoom object
participantAddressLinphoneAddress object
-
onChatMessageShouldBeStored(chatRoom:Default implementationmessage: ) 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
chatRoomLinphoneChatRoom object
messageThe LinphoneChatMessage that is being received
-
onChatMessageParticipantImdnStateChanged(chatRoom:Default implementationmessage: state: ) 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
chatRoomLinphoneChatRoom object
messageThe LinphoneChatMessage for which a participant has it’s state changed
stateThe LinphoneParticipantImdnState
ChatRoomDelegate Protocol Reference