ChatMessageDelegate
open class ChatMessageDelegate : LinphoneObjectDelegate
Undocumented
-
Undocumented
Declaration
Swift
public init()
-
Call back used to notify participant IMDN state.
Declaration
Swift
open func onParticipantImdnStateChanged(msg: ChatMessage, state: ParticipantImdnState)
Parameters
msg
LinphoneChatMessage object
state
LinphoneParticipantImdnState
-
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.
Declaration
Swift
open func onFileTransferRecv(msg: ChatMessage, content: Content, buffer: Buffer)
Parameters
msg
LinphoneChatMessage message from which the body is received.
content
LinphoneContent incoming content information
buffer
LinphoneBuffer holding the received data. Empty buffer means end of file.
-
Call back used to notify message delivery status.
Declaration
Swift
open func onMsgStateChanged(msg: ChatMessage, state: ChatMessage.State)
Parameters
msg
LinphoneChatMessage object
-
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.
Declaration
Swift
open func onFileTransferSend(msg: ChatMessage, content: Content, offset: Int, size: Int) -> Buffer?
Parameters
msg
LinphoneChatMessage message from which the body is received.
content
LinphoneContent outgoing content
offset
the offset in the file from where to get the data to be sent
size
the 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.
-
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.
Declaration
Swift
open func onEphemeralMessageTimerStarted(msg: ChatMessage)
Parameters
msg
LinphoneChatMessage object
-
File transfer progress indication callback prototype.
Declaration
Swift
open func onFileTransferProgressIndication(msg: ChatMessage, content: Content, offset: Int, total: Int)
Parameters
msg
LinphoneChatMessage message from which the body is received.
content
LinphoneContent incoming content information
offset
The number of bytes sent/received since the beginning of the transfer.
total
The total number of bytes to be sent/received.
-
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.
Declaration
Swift
open func onFileTransferSendChunk(message: ChatMessage, content: Content, offset: Int, size: Int, buffer: Buffer)
Parameters
message
LinphoneChatMessage message from which the body is received. @notnil
content
LinphoneContent outgoing content @notnil
offset
the offset in the file from where to get the data to be sent
size
the number of bytes expected by the framework
buffer
A LinphoneBuffer to be filled. Leave it empty when end of file has been reached. @notnil
-
Call back used to notify ephemeral message is deleted.
Declaration
Swift
open func onEphemeralMessageDeleted(msg: ChatMessage)
Parameters
msg
LinphoneChatMessage object