Package org.linphone.core
Interface ChatRoomParams
public interface ChatRoomParams
Object defining parameters for a
Can be created with
If the
other parameter is required, but
benefit from all features a {@link ChatRoom#Backend#FlexisipChat} can offer
like conversation with multiple participants and a subject, end-to-end
encryption, ephemeral messages, etc... but this type is the only one that can
interoperate with other SIP clients or with non-flexisip SIP proxies.
ChatRoom
. Can be created with
Core.createDefaultChatRoomParams()
. You can useisValid()
to check if your configuration is valid or not.If the
ChatRoom
backend is {@link ChatRoom#Backend#Basic}, then noother parameter is required, but
ChatMessage
sent and received won'tbenefit from all features a {@link ChatRoom#Backend#FlexisipChat} can offer
like conversation with multiple participants and a subject, end-to-end
encryption, ephemeral messages, etc... but this type is the only one that can
interoperate with other SIP clients or with non-flexisip SIP proxies.
-
Method Summary
Modifier and TypeMethodDescriptionGet the backend implementation of the chat room associated with the given
parameters.Get the encryption implementation of the chat room associated with the given
parameters.long
Get lifetime (in seconds) for all new ephemeral messages in the chat room.Get the ephemeral message mode of the chat room associated with the given
parameters.long
Gets the native pointer used by this class to make native method calls.Get the subject of the chat room.Gets the object stored in this object user's databoolean
Get the encryption status of the chat room associated with the given
parameters.boolean
Get the group chat status of the chat room associated with the given
parameters.boolean
Get the real time text status of the chat room associated with the given
parameters.boolean
isValid()
Returns whether the given parameters are valid or not.void
setBackend
(ChatRoom.Backend backend) Set the backend implementation of these chat room parameters.void
Set the encryption backend implementation of these chat room parameters.void
setEncryptionEnabled
(boolean encrypted) Enables or disables encryption for the chat room associated with the given
parameters.void
setEphemeralLifetime
(long time) Set lifetime (in seconds) for all new ephemral messages in the chat room.void
Enables or disables forcing of ephemeral messages for the chat room associated
with the given parameters.void
setGroupEnabled
(boolean group) Enables or disables group chat for the chat room associated with the given
parameters.void
setRttEnabled
(boolean rtt) Enables or disables real time text for the chat room associated with the given
parameters.void
setSubject
(String subject) Set the subject of the chat room.void
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getBackend
ChatRoom.Backend getBackend()Get the backend implementation of the chat room associated with the given
parameters.
- Returns:
- the
ChatRoom#Backend
-
setBackend
Set the backend implementation of these chat room parameters.
- Parameters:
backend
- TheChatRoom#Backend
enum value
-
getEncryptionBackend
ChatRoom.EncryptionBackend getEncryptionBackend()Get the encryption implementation of the chat room associated with the given
parameters.
- Returns:
- the
ChatRoom#EncryptionBackend
-
setEncryptionBackend
Set the encryption backend implementation of these chat room parameters.
- Parameters:
backend
- TheChatRoom#EncryptionBackend
enum value
-
isEncryptionEnabled
boolean isEncryptionEnabled()Get the encryption status of the chat room associated with the given
parameters.
- Returns:
- true if encryption is enabled, false otherwise
-
setEncryptionEnabled
void setEncryptionEnabled(boolean encrypted) Enables or disables encryption for the chat room associated with the given
parameters.
-
getEphemeralLifetime
long getEphemeralLifetime()Get lifetime (in seconds) for all new ephemeral messages in the chat room.
After the message is read, it will be deleted after "time" seconds. see:
linphone_chat_room_params_ephemeral_enabled()- Returns:
- the ephemeral lifetime (in seconds)
-
setEphemeralLifetime
void setEphemeralLifetime(long time) Set lifetime (in seconds) for all new ephemral messages in the chat room.
After the message is read, it will be deleted after "time" seconds. see:
linphone_chat_room_params_ephemeral_enabled()- Parameters:
time
- The ephemeral lifetime, default is disabled (0)
-
getEphemeralMode
ChatRoom.EphemeralMode getEphemeralMode()Get the ephemeral message mode of the chat room associated with the given
parameters.
- Returns:
- the ephemeral message mode
ChatRoom#EphemeralMode
-
setEphemeralMode
Enables or disables forcing of ephemeral messages for the chat room associated
with the given parameters.
- Parameters:
mode
- Ephemeral message modeChatRoom#EphemeralMode
.
-
isGroupEnabled
boolean isGroupEnabled()Get the group chat status of the chat room associated with the given
parameters.
- Returns:
- true if group chat is enabled, false if one-to-one
-
setGroupEnabled
void setGroupEnabled(boolean group) Enables or disables group chat for the chat room associated with the given
parameters.
-
isValid
boolean isValid()Returns whether the given parameters are valid or not.
- Returns:
- true if the given parameters are valid, false otherwise
-
isRttEnabled
boolean isRttEnabled()Get the real time text status of the chat room associated with the given
parameters.
- Returns:
- true if real time text is enabled, false otherwise
-
setRttEnabled
void setRttEnabled(boolean rtt) Enables or disables real time text for the chat room associated with the given
parameters.
-
getSubject
Get the subject of the chat room.
- Returns:
- The subject.
-
setSubject
Set the subject of the chat room.
- Parameters:
subject
- The subject to set.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-