ChatMessageDelegate
public protocol ChatMessageDelegate : AnyObject
-
onMsgStateChanged(message:Default implementationstate: ) Call back used to notify message delivery status.
Default Implementation
Declaration
Swift
func onMsgStateChanged(message: ChatMessage, state: ChatMessage.State)Parameters
messageLinphoneChatMessage object
stateLinphoneChatMessageState
-
onFileTransferRecv(message:Default implementationcontent: buffer: ) File transfer receive callback prototype. This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.
Default Implementation
Declaration
Swift
func onFileTransferRecv(message: ChatMessage, content: Content, buffer: Buffer)Parameters
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent incoming content information
bufferLinphoneBuffer holding the received data. Empty buffer means end of file.
-
onFileTransferSend(message:Default implementationcontent: offset: size: ) File transfer send callback prototype. This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.
Warning
The returned value isn’t used, hence the deprecation!- deprecated: 17/08/2020 Use LinphoneChatMessageCbsFileTransferSendChunkCb instead.
Default Implementation
Declaration
Swift
func onFileTransferSend(message: ChatMessage, content: Content, offset: Int, size: Int) -> Buffer?Parameters
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent outgoing content
offsetthe offset in the file from where to get the data to be sent
sizethe number of bytes expected by the framework
Return Value
A LinphoneBuffer object holding the data written by the application. An empty buffer means end of file.
-
onFileTransferSendChunk(message:Default implementationcontent: offset: size: buffer: ) File transfer send callback prototype. This function is called by the core when an outgoing file transfer is started. This function is called until size is set to 0.
Default Implementation
Declaration
Swift
func onFileTransferSendChunk(message: ChatMessage, content: Content, offset: Int, size: Int, buffer: Buffer)Parameters
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent outgoing content
offsetthe offset in the file from where to get the data to be sent
sizethe number of bytes expected by the framework
bufferA LinphoneBuffer to be filled. Leave it empty when end of file has been reached.
-
onFileTransferProgressIndication(message:Default implementationcontent: offset: total: ) File transfer progress indication callback prototype.
Default Implementation
Declaration
Swift
func onFileTransferProgressIndication(message: ChatMessage, content: Content, offset: Int, total: Int)Parameters
messageLinphoneChatMessage message from which the body is received.
contentLinphoneContent incoming content information
offsetThe number of bytes sent/received since the beginning of the transfer.
totalThe total number of bytes to be sent/received.
-
onParticipantImdnStateChanged(message:Default implementationstate: ) Call back used to notify participant IMDN state.
Default Implementation
Declaration
Swift
func onParticipantImdnStateChanged(message: ChatMessage, state: ParticipantImdnState)Parameters
messageLinphoneChatMessage object
stateLinphoneParticipantImdnState
-
onEphemeralMessageTimerStarted(message:Default implementation) Callback used to notify an ephemeral message that its lifespan 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(message: ChatMessage)Parameters
messageLinphoneChatMessage object
-
onEphemeralMessageDeleted(message:Default implementation) Call back used to notify ephemeral message is deleted.
Default Implementation
Declaration
Swift
func onEphemeralMessageDeleted(message: ChatMessage)Parameters
messageLinphoneChatMessage object
ChatMessageDelegate Protocol Reference