public interface ChatRoom
Core.createChatRoom(org.linphone.core.ChatRoomParams, java.lang.String, org.linphone.core.Address[])
.Modifier and Type | Interface and Description |
---|---|
static class |
ChatRoom.State |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ChatRoomListener listener) |
void |
addParticipant(Address addr)
Add a participant to a chat room.
|
boolean |
addParticipants(Address[] addresses)
Add several participants to a chat room at once.
|
void |
allowCpim()
Allow cpim on a basic chat room .
|
void |
allowMultipart()
Allow multipart on a basic chat room .
|
boolean |
canHandleParticipants()
Tells whether a chat room is able to handle participants.
|
void |
compose()
Notifies the destination of the chat message being composed that the user is
typing a new message.
|
ChatMessage |
createEmptyMessage()
Creates an empty message attached to a dedicated chat room.
|
ChatMessage |
createFileTransferMessage(Content initialContent)
Creates a message attached to a dedicated chat room with a particular content.
|
ChatMessage |
createForwardMessage(ChatMessage msg)
Creates a forward message attached to a dedicated chat room with a particular
message.
|
ChatMessage |
createMessage(java.lang.String message)
Creates a message attached to a dedicated chat room.
|
void |
deleteHistory()
Delete all messages from the history.
|
void |
deleteMessage(ChatMessage msg)
Delete a message from the chat room history.
|
void |
enableEphemeral(boolean ephem)
Enable or disable the ephemeral message feature in the chat room.
|
boolean |
ephemeralEnabled()
Returns whether or not the ephemeral message feature is enabled in the chat
room.
|
boolean |
ephemeralSupportedByAllParticipants()
Uses linphone spec to check if all participants support ephemeral messages.
|
ChatMessage |
findMessage(java.lang.String messageId)
Gets the chat message sent or received in this chat room that matches the
message_id.
|
Participant |
findParticipant(Address addr)
Find a participant of a chat room from its address.
|
Call |
getCall()
get Curent Call associated to this chatroom if any To commit a message, use
linphone_chat_room_send_message
|
int |
getCapabilities()
Get the capabilities of a chat room.
|
int |
getChar()
When realtime text is enabled linphone_call_params_realtime_text_enabled,
LinphoneCoreIsComposingReceivedCb is call everytime a char is received from
peer.
|
Address[] |
getComposingAddresses()
Gets the list of participants that are currently composing.
|
Address |
getConferenceAddress()
Get the conference address of the chat room.
|
Core |
getCore()
Returns back pointer to
Core object. |
ChatRoomParams |
getCurrentParams()
Returns current parameters associated with the chat room.
|
long |
getEphemeralLifetime()
Get lifetime (in seconds) for all new ephemeral messages in the chat room.
|
ChatMessage[] |
getHistory(int nbMessage)
Gets nb_message most recent messages from cr chat room, sorted from oldest to
most recent.
|
EventLog[] |
getHistoryEvents(int nbEvents)
Gets nb_events most recent events from cr chat room, sorted from oldest to most
recent.
|
int |
getHistoryEventsSize()
Gets the number of events in a chat room.
|
EventLog[] |
getHistoryMessageEvents(int nbEvents)
Gets nb_events most recent chat message events from cr chat room, sorted from
oldest to most recent.
|
ChatMessage[] |
getHistoryRange(int begin,
int end)
Gets the partial list of messages in the given range, sorted from oldest to
most recent.
|
EventLog[] |
getHistoryRangeEvents(int begin,
int end)
Gets the partial list of events in the given range, sorted from oldest to most
recent.
|
EventLog[] |
getHistoryRangeMessageEvents(int begin,
int end)
Gets the partial list of chat message events in the given range, sorted from
oldest to most recent.
|
int |
getHistorySize()
Gets the number of messages in a chat room.
|
ChatMessage |
getLastMessageInHistory()
Gets the last chat message sent or received in this chat room.
|
long |
getLastUpdateTime()
Return the last updated time for the chat room.
|
Address |
getLocalAddress()
get local address associated to this
ChatRoom |
Participant |
getMe()
Get the participant representing myself in the chat room.
|
int |
getNbParticipants()
Get the number of participants in the chat room (that is without ourselves).
|
Participant[] |
getParticipants()
Get the list of participants of a chat room.
|
Address |
getPeerAddress()
get peer address associated to this
ChatRoom |
ChatRoomSecurityLevel |
getSecurityLevel()
Get the security level of a chat room.
|
ChatRoom.State |
getState()
Get the state of the chat room.
|
java.lang.String |
getSubject()
Get the subject of a chat room.
|
int |
getUnreadMessagesCount()
Gets the number of unread messages in the chatroom.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
boolean |
hasBeenLeft()
Return whether or not the chat room has been left.
|
boolean |
hasCapability(int mask)
Check if a chat room has given capabilities.
|
boolean |
isEmpty()
Returns whether or not a
ChatRoom has at least one ChatMessage
or not. |
boolean |
isRemoteComposing()
Tells whether the remote is currently composing a message.
|
void |
leave()
Leave a chat room.
|
boolean |
limeAvailable()
Returns true if lime is available for given peer.
|
void |
markAsRead()
Mark all messages of the conversation as read.
|
void |
notifyParticipantDeviceRegistration(Address participantDevice)
Notify the chatroom that a participant device has just registered.
|
void |
receiveChatMessage(ChatMessage msg)
Used to receive a chat message when using async mechanism with IM encryption
engine.
|
void |
removeListener(ChatRoomListener listener) |
void |
removeParticipant(Participant participant)
Remove a participant of a chat room.
|
void |
removeParticipants(Participant[] participants)
Remove several participants of a chat room at once.
|
void |
sendChatMessage(ChatMessage msg)
Send a message to peer member of this chat room.
|
void |
setConferenceAddress(Address confAddr)
Set the conference address of a group chat room.
|
void |
setEphemeralLifetime(long time)
Set lifetime (in seconds) for all new ephemral messages in the chat room.
|
void |
setParticipantAdminStatus(Participant participant,
boolean isAdmin)
Change the admin status of a participant of a chat room (you need to be an
admin yourself to do this).
|
void |
setParticipantDevices(Address partAddr,
ParticipantDeviceIdentity[] deviceIdentities)
Set the list of participant devices in the form of SIP URIs with GRUUs for a
given participant.
|
void |
setSubject(java.lang.String subject)
Set the subject of a chat room.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
Call getCall()
Call
or null.int getCapabilities()
int getChar()
ChatMessage
is received with
committed data from LinphoneCoreMessageReceivedCb.Address[] getComposingAddresses()
Address
objects. LinphoneAddress list of addresses
that are in the is_composing stateAddress getConferenceAddress()
void setConferenceAddress(Address confAddr)
confAddr
- The conference address to be used by the group chat roomChatRoomParams getCurrentParams()
Core.createChatRoom(org.linphone.core.ChatRoomParams, java.lang.String, org.linphone.core.Address[])
or some default parameters if no ChatRoomParams
was explicitely passed during chat room creation.boolean ephemeralEnabled()
void enableEphemeral(boolean ephem)
ephem
- if the ephemeral message feature is enabled, true otherwise.long getEphemeralLifetime()
void setEphemeralLifetime(long time)
time
- The ephemral lifetime, default 24h, 86400sint getHistoryEventsSize()
int getHistorySize()
boolean isEmpty()
ChatRoom
has at least one ChatMessage
or not.ChatMessage
, false otherwise.boolean isRemoteComposing()
ChatMessage getLastMessageInHistory()
ChatMessage
long getLastUpdateTime()
Address getLocalAddress()
ChatRoom
Address
local addressParticipant getMe()
int getNbParticipants()
Participant[] getParticipants()
Address getPeerAddress()
ChatRoom
Address
peer addressChatRoomSecurityLevel getSecurityLevel()
ChatRoom.State getState()
java.lang.String getSubject()
void setSubject(java.lang.String subject)
subject
- The new subject to set for the chat roomint getUnreadMessagesCount()
void addParticipant(Address addr)
canHandleParticipants()
to know if this chat room handles
participants.addr
- The address of the participant to add to the chat roomboolean addParticipants(Address[] addresses)
canHandleParticipants()
to know if this chat room handles
participants.addresses
- A list of Address
objects. LinphoneAddressvoid allowCpim()
void allowMultipart()
boolean canHandleParticipants()
void compose()
ChatMessage createEmptyMessage()
ChatMessage
ChatMessage createFileTransferMessage(Content initialContent)
initialContent
- Content
initial content.
LinphoneCoreVTable.file_transfer_send is invoked later to notify file transfer
progress and collect next chunk of the message if LinphoneContent.data is null.ChatMessage
ChatMessage createForwardMessage(ChatMessage msg)
msg
- ChatMessage
message to be forwarded.ChatMessage
ChatMessage createMessage(java.lang.String message)
message
- text message, null if absent.ChatMessage
void deleteHistory()
void deleteMessage(ChatMessage msg)
msg
- The ChatMessage
object to remove.boolean ephemeralSupportedByAllParticipants()
ChatMessage findMessage(java.lang.String messageId)
messageId
- The id of the message to findChatMessage
Participant findParticipant(Address addr)
addr
- The address to search in the list of participants of the chat roomChatMessage[] getHistory(int nbMessage)
nbMessage
- Number of message to retrieve. 0 means everything.ChatMessage
objects. LinphoneChatMessage The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.EventLog[] getHistoryEvents(int nbEvents)
nbEvents
- Number of events to retrieve. 0 means everything.EventLog
objects. LinphoneEventLog The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.EventLog[] getHistoryMessageEvents(int nbEvents)
nbEvents
- Number of events to retrieve. 0 means everything.EventLog
objects. LinphoneEventLog The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.ChatMessage[] getHistoryRange(int begin, int end)
end
- The last message of the range to be retrieved. History oldest
message has index of history size - 1 (use linphone_chat_room_get_history_size
to retrieve history size)ChatMessage
objects. LinphoneChatMessage The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.EventLog[] getHistoryRangeEvents(int begin, int end)
end
- The last event of the range to be retrieved. History oldest event
has index of history size - 1EventLog
objects. LinphoneEventLog The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.EventLog[] getHistoryRangeMessageEvents(int begin, int end)
end
- The last event of the range to be retrieved. History oldest event
has index of history size - 1EventLog
objects. LinphoneEventLog The objects
inside the list are freshly allocated with a reference counter equal to one, so
they need to be freed on list destruction with bctbx_list_free_with_data() for
instance.boolean hasBeenLeft()
boolean hasCapability(int mask)
mask
- A Capabilities maskvoid leave()
boolean limeAvailable()
void markAsRead()
void notifyParticipantDeviceRegistration(Address participantDevice)
void receiveChatMessage(ChatMessage msg)
msg
- ChatMessage
objectvoid removeParticipant(Participant participant)
participant
- The participant to remove from the chat roomvoid removeParticipants(Participant[] participants)
participants
- A list of LinphoneParticipant objects. LinphoneParticipantvoid sendChatMessage(ChatMessage msg)
ChatMessage
instead of totaly takes ownership on it. Thus, the
ChatMessage
object must be released by the API user after calling that
function.msg
- The message to send.void setParticipantAdminStatus(Participant participant, boolean isAdmin)
isAdmin
- A boolean value telling whether the participant should now be an
admin or notvoid setParticipantDevices(Address partAddr, ParticipantDeviceIdentity[] deviceIdentities)
deviceIdentities
- A list of LinphoneParticipantDeviceIdentity objects.
LinphoneParticipantDeviceIdentity list of the participant devices to be used
by the group chat roomvoid addListener(ChatRoomListener listener)
void removeListener(ChatRoomListener listener)
void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()