Package org.linphone.core
Interface ChatMessageListener
- All Known Implementing Classes:
ChatMessageListenerStub
public interface ChatMessageListener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onEphemeralMessageDeleted
(ChatMessage message) Call back used to notify ephemeral message is deleted.void
Callback used to notify an ephemeral message that its lifespan before
disappearing has started to decrease.void
onFileTransferProgressIndication
(ChatMessage message, Content content, int offset, int total) File transfer progress indication callback prototype.void
onFileTransferRecv
(ChatMessage message, Content content, Buffer buffer) File transfer receive callback prototype.onFileTransferSend
(ChatMessage message, Content content, int offset, int size) Deprecated.void
onFileTransferSendChunk
(ChatMessage message, Content content, int offset, int size, Buffer buffer) File transfer send callback prototype.void
onMsgStateChanged
(ChatMessage message, ChatMessage.State state) Call back used to notify message delivery status.void
onNewMessageReaction
(ChatMessage message, ChatMessageReaction reaction) Callback used to notify a reaction has been received or sent for a given
message.void
onParticipantImdnStateChanged
(ChatMessage message, ParticipantImdnState state) Call back used to notify participant IMDN state.void
onReactionRemoved
(ChatMessage message, Address address) Callback used to notify a reaction has been removed from a given message.
-
Method Details
-
onMsgStateChanged
Call back used to notify message delivery status.
- Parameters:
message
-ChatMessage
objectstate
-ChatMessage#State
-
onNewMessageReaction
Callback used to notify a reaction has been received or sent for a given
message.
- Parameters:
message
- LinphoneChatMessage objectreaction
- the LinphoneChatMessageReaction reaction that was sent or
received
-
onReactionRemoved
Callback used to notify a reaction has been removed from a given message.
- Parameters:
message
- LinphoneChatMessage objectaddress
- the LinphoneAddress of the person that removed it's reaction
-
onFileTransferRecv
void onFileTransferRecv(@NonNull ChatMessage message, @NonNull Content content, @NonNull Buffer 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.- Parameters:
message
-ChatMessage
message from which the body is received.content
-Content
incoming content informationbuffer
-Buffer
holding the received data. Empty buffer means end
of file.
-
onFileTransferSend
Buffer onFileTransferSend(@NonNull ChatMessage message, @NonNull Content content, int offset, int size) Deprecated.17/08/2020 Use LinphoneChatMessageCbsFileTransferSendChunkCb
instead.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.- Parameters:
message
-ChatMessage
message from which the body is received.content
-Content
outgoing contentoffset
- the offset in the file from where to get the data to be sentsize
- the number of bytes expected by the framework- Returns:
- A
Buffer
object holding the data written by the application. An
empty buffer means end of file.
warning: The returned value isn't used, hence the deprecation!
-
onFileTransferSendChunk
void onFileTransferSendChunk(@NonNull ChatMessage message, @NonNull Content content, int offset, int size, @NonNull Buffer 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.- Parameters:
message
-ChatMessage
message from which the body is received.content
-Content
outgoing contentoffset
- the offset in the file from where to get the data to be sentsize
- the number of bytes expected by the frameworkbuffer
- ABuffer
to be filled. Leave it empty when end of file
has been reached.
-
onFileTransferProgressIndication
void onFileTransferProgressIndication(@NonNull ChatMessage message, @NonNull Content content, int offset, int total) File transfer progress indication callback prototype.
- Parameters:
message
-ChatMessage
message from which the body is received.content
-Content
incoming content informationoffset
- The number of bytes sent/received since the beginning of the
transfer.total
- The total number of bytes to be sent/received.
-
onParticipantImdnStateChanged
void onParticipantImdnStateChanged(@NonNull ChatMessage message, @NonNull ParticipantImdnState state) Call back used to notify participant IMDN state.
- Parameters:
message
-ChatMessage
objectstate
-ParticipantImdnState
-
onEphemeralMessageTimerStarted
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.- Parameters:
message
- LinphoneChatMessage object
-
onEphemeralMessageDeleted
Call back used to notify ephemeral message is deleted.
- Parameters:
message
- LinphoneChatMessage object
-
instead.