Liblinphone
5.3.0
|
A chat room is the place where ChatMessage are exchanged. More...
#include <chat_room.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | ChatRoom (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneChatRoom * | cPtr () |
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< ChatRoomListener > &listener) |
Add an application listener to the ChatRoom instance. More... | |
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< ChatRoomListener > &listener) |
Remove a previously added listener from the ChatRoom instance. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getCall () const |
Gets the current call associated to this chatroom if any To commit a message, use ChatMessage::send() More... | |
LINPHONECXX_PUBLIC unsigned int | getCapabilities () const |
Get the capabilities of a chat room. More... | |
LINPHONECXX_PUBLIC uint32_t | getChar () |
When realtime text is enabled CallParams::realtimeTextEnabled(), LinphoneCoreIsComposingReceivedCb is call everytime a char is received from peer. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Address > > | getComposingAddresses () |
Gets the list of participants that are currently composing. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getConferenceAddress () const |
Get the conference address of the chat room. More... | |
LINPHONECXX_PUBLIC void | setConferenceAddress (const std::shared_ptr< linphone::Address > &conferenceAddress) |
Set the conference address of a group chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Core > | getCore () const |
Returns back pointer to Core object. More... | |
LINPHONECXX_PUBLIC time_t | getCreationTime () const |
Return the creation time for the chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ChatRoomParams > | getCurrentParams () const |
Returns current parameters associated with the chat room. More... | |
LINPHONECXX_PUBLIC bool | ephemeralEnabled () const |
Returns whether or not the ephemeral message feature is enabled in the chat room. More... | |
LINPHONECXX_PUBLIC void | enableEphemeral (bool enable) |
Enable or disable the ephemeral message feature in the chat room. More... | |
LINPHONECXX_PUBLIC long | getEphemeralLifetime () const |
Get lifetime (in seconds) for all new ephemeral messages in the chat room. More... | |
LINPHONECXX_PUBLIC void | setEphemeralLifetime (long time) |
Set lifetime (in seconds) for all new ephemeral messages in the chat room. More... | |
LINPHONECXX_PUBLIC EphemeralMode | getEphemeralMode () const |
Get the ephemeral mode of the chat room. More... | |
LINPHONECXX_PUBLIC void | setEphemeralMode (EphemeralMode mode) |
Set the ephemeral mode of the chat room. More... | |
LINPHONECXX_PUBLIC int | getHistoryEventsSize () |
Gets the number of events in a chat room. More... | |
LINPHONECXX_PUBLIC int | getHistorySize () |
Gets the number of messages in a chat room. More... | |
LINPHONECXX_PUBLIC bool | isEmpty () |
Returns whether or not a ChatRoom has at least one ChatMessage or not. More... | |
LINPHONECXX_PUBLIC bool | isReadOnly () const |
Return whether or not a message can be sent using this chat room. More... | |
LINPHONECXX_PUBLIC bool | isRemoteComposing () const |
Tells whether the remote is currently composing a message. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | getLastMessageInHistory () |
Gets the last chat message sent or received in this chat room. More... | |
LINPHONECXX_PUBLIC time_t | getLastUpdateTime () const |
Return the last updated time for the chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getLocalAddress () |
Get the local address associated to this chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Participant > | getMe () const |
Get the participant representing myself in the chat room. More... | |
LINPHONECXX_PUBLIC bool | getMuted () const |
Gets if a chat room has been flagged as muted (not by default). More... | |
LINPHONECXX_PUBLIC void | setMuted (bool muted) |
Sets if a chat room should be considered as muted or not. More... | |
LINPHONECXX_PUBLIC int | getNbParticipants () const |
Get the number of participants in the chat room (that is without ourselves). More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Participant > > | getParticipants () const |
Get the list of participants of a chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getPeerAddress () |
Get the peer address associated to this chat room. More... | |
LINPHONECXX_PUBLIC SecurityLevel | getSecurityLevel () |
Get the security level of a chat room. More... | |
LINPHONECXX_PUBLIC State | getState () const |
Get the state of the chat room. More... | |
LINPHONECXX_PUBLIC std::string | getSubject () const |
Get the subject of a chat room. More... | |
LINPHONECXX_PUBLIC void | setSubject (const std::string &subject) |
Set the subject of a chat room. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::ChatMessage > > | getUnreadHistory () |
Gets all unread messages for this chat room, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC int | getUnreadMessagesCount () |
Gets the number of unread messages in the chatroom. More... | |
LINPHONECXX_PUBLIC void | addParticipant (const std::shared_ptr< linphone::Address > &addr) |
Add a participant to a chat room. More... | |
LINPHONECXX_PUBLIC bool | addParticipants (const std::list< std::shared_ptr< linphone::Address >> &addresses) |
Add several participants to a chat room at once. More... | |
LINPHONECXX_PUBLIC void | allowCpim () |
Allow cpim on a basic chat room . | |
LINPHONECXX_PUBLIC void | allowMultipart () |
Allow multipart on a basic chat room . | |
LINPHONECXX_PUBLIC bool | canHandleParticipants () const |
Tells whether a chat room is able to handle participants. More... | |
LINPHONECXX_PUBLIC void | compose () |
Notifies the destination of the chat message being composed that the user is typing a new message. | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createEmptyMessage () |
Creates an empty message attached to the given chat room. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createFileTransferMessage (const std::shared_ptr< linphone::Content > &initialContent) |
Creates a message attached to the given chat room with a particular content. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createForwardMessage (const std::shared_ptr< linphone::ChatMessage > &message) |
Creates a forward message attached to the given chat room with a particular message. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::shared_ptr< linphone::ChatMessage > | createMessage (const std::string &message) |
Creates a message attached to the given chat room with a plain text content filled with the given message. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createMessageFromUtf8 (const std::string &message) |
Creates a message attached to the given chat room with a plain text content filled with the given message. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createReplyMessage (const std::shared_ptr< linphone::ChatMessage > &message) |
Creates a reply message attached to the given chat room with a particular message. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | createVoiceRecordingMessage (const std::shared_ptr< linphone::Recorder > &recorder) |
Creates a chat message with a voice recording attached to the given chat room. More... | |
LINPHONECXX_PUBLIC void | deleteHistory () |
Delete all messages from the history. | |
LINPHONECXX_PUBLIC void | deleteMessage (const std::shared_ptr< linphone::ChatMessage > &message) |
Delete a message from the chat room history. More... | |
LINPHONECXX_PUBLIC bool | ephemeralSupportedByAllParticipants () const |
Uses linphone spec to check if all participants support ephemeral messages. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatMessage > | findMessage (const std::string &messageId) |
Gets the chat message sent or received in this chat room that matches the message_id. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Participant > | findParticipant (const std::shared_ptr< linphone::Address > &address) const |
Find a participant of a chat room from its address. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::ChatMessage > > | getHistory (int nbMessage) |
Gets nb_message most recent messages from chat_room chat room, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::EventLog > > | getHistoryEvents (int nbEvents) |
Gets nb_events most recent events from chat_room chat room, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::EventLog > > | getHistoryMessageEvents (int nbEvents) |
Gets nb_events most recent chat message events from chat_room chat room, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::ChatMessage > > | getHistoryRange (int begin, int end) |
Gets the partial list of messages in the given range, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::EventLog > > | getHistoryRangeEvents (int begin, int end) |
Gets the partial list of events in the given range, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::EventLog > > | getHistoryRangeMessageEvents (int begin, int end) |
Gets the partial list of chat message events in the given range, sorted from oldest to most recent. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED bool | hasBeenLeft () const |
Return whether or not the chat room has been left. More... | |
LINPHONECXX_PUBLIC bool | hasCapability (int mask) const |
Check if a chat room has given capabilities. More... | |
LINPHONECXX_PUBLIC void | leave () |
Leave a chat room. | |
LINPHONECXX_PUBLIC void | markAsRead () |
Mark all messages of the conversation as read. | |
LINPHONECXX_PUBLIC void | notifyParticipantDeviceRegistration (const std::shared_ptr< const linphone::Address > &participantDevice) |
Notify the chatroom that a participant device has just registered. More... | |
LINPHONECXX_PUBLIC void | receiveChatMessage (const std::shared_ptr< linphone::ChatMessage > &message) |
Used to receive a chat message when using async mechanism with IM enchat_roomyption engine. More... | |
LINPHONECXX_PUBLIC void | removeParticipant (const std::shared_ptr< linphone::Participant > &participant) |
Remove a participant of a chat room. More... | |
LINPHONECXX_PUBLIC void | removeParticipants (const std::list< std::shared_ptr< linphone::Participant >> &participants) |
Remove several participants of a chat room at once. More... | |
LINPHONECXX_PUBLIC void | setParticipantAdminStatus (const std::shared_ptr< linphone::Participant > &participant, bool isAdmin) |
Change the admin status of a participant of a chat room (you need to be an admin yourself to do this). More... | |
LINPHONECXX_PUBLIC void | setParticipantDevices (const std::shared_ptr< linphone::Address > &participantAddress, const std::list< std::shared_ptr< linphone::ParticipantDeviceIdentity >> &deviceIdentities) |
Set the list of participant devices in the form of SIP URIs with GRUUs for a given participant. More... | |
Static Public Member Functions | |
static LINPHONECXX_PUBLIC std::string | stateToString (State state) |
Converts a State enum to a string. More... | |
A chat room is the place where ChatMessage are exchanged.
To create (or find) a ChatRoom, you first need a ChatRoomParams object. A chat room is uniquely identified by it's local and remote SIP addresses, meaning you can only have one chat room between two accounts (unless the backend is Backend::FlexisipChat). Then you can call Core::searchChatRoom() or Core::createChatRoom(). Be careful as a Backend::FlexisipChat backend ChatRoom will be created asynchronously, so make sure you add a ChatRoomListener to the returned object to be notified when it will be in state State::Created. All chat rooms are loaded from database when the Core starts, and you can get them using Core::getChatRooms(). This method doesn't return empty chat rooms nor ones for which the local address doesn't match an existing ProxyConfig identity, unless you specify otherwise in the [misc] section of your configuration file by setting hide_empty_chat_rooms=0 and/or hide_chat_rooms_from_removed_proxies=0.
|
strong |
Backend is used to indicate the backend implementation of a chat room.
Enumerator | |
---|---|
Basic | Basic (client-to-client) chat room. |
FlexisipChat | Server-based chat room. |
|
strong |
Capabilities is used to indicate the capabilities of a chat room.
Enumerator | |
---|---|
None | No capabilities. |
Basic | No server. |
RealTimeText | Supports RTT. |
Conference | Use server (supports group chat) |
Proxy | Special proxy chat room flag. |
Migratable | Chat room migratable from Basic to Conference. |
OneToOne | A communication between two participants (can be Basic or Conference) |
Encrypted | Chat room is encrypted. |
Ephemeral | Chat room can enable ephemeral messages. |
|
strong |
EncryptionBackend is used to indicate the encryption engine used by a chat room.
Enumerator | |
---|---|
None | No encryption. |
Lime | Lime x3dh encryption. |
|
strong |
EphemeralMode is used to the ephemeral message mode used by a chat room.
Enumerator | |
---|---|
DeviceManaged | Each device manages its own ephemeral settings. |
AdminManaged | Ephemeral settings are chatroom wide and only admins can change them. |
|
strong |
TODO move to encryption engine object when available SecurityLevel is used to indicate the encryption security level of a chat room.
Enumerator | |
---|---|
Unsafe | Security failure. |
ClearText | No encryption. |
Encrypted | Encrypted. |
Safe | Encrypted and verified. |
|
strong |
State is used to indicate the current state of a chat room.
LINPHONECXX_PUBLIC void linphone::ChatRoom::addListener | ( | const std::shared_ptr< ChatRoomListener > & | listener | ) |
Add an application listener to the ChatRoom instance.
listener | the application listener |
LINPHONECXX_PUBLIC void linphone::ChatRoom::addParticipant | ( | const std::shared_ptr< linphone::Address > & | addr | ) |
Add a participant to a chat room.
This may fail if this type of chat room does not handle participants. Use canHandleParticipants() to know if this chat room handles participants.
addr | The address of the participant to add to the chat room |
LINPHONECXX_PUBLIC bool linphone::ChatRoom::addParticipants | ( | const std::list< std::shared_ptr< linphone::Address >> & | addresses | ) |
Add several participants to a chat room at once.
This may fail if this type of chat room does not handle participants. Use canHandleParticipants() to know if this chat room handles participants.
addresses | The participants to add. |
LINPHONECXX_PUBLIC bool linphone::ChatRoom::canHandleParticipants | ( | ) | const |
Tells whether a chat room is able to handle participants.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createEmptyMessage | ( | ) |
Creates an empty message attached to the given chat room.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createFileTransferMessage | ( | const std::shared_ptr< linphone::Content > & | initialContent | ) |
Creates a message attached to the given chat room with a particular content.
Use ChatMessage::send() to initiate the transfer
initialContent | Content initial content. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createForwardMessage | ( | const std::shared_ptr< linphone::ChatMessage > & | message | ) |
Creates a forward message attached to the given chat room with a particular message.
message | ChatMessage message to be forwarded. |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createMessage | ( | const std::string & | message | ) |
Creates a message attached to the given chat room with a plain text content filled with the given message.
message | text message, nullptr if absent. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createMessageFromUtf8 | ( | const std::string & | message | ) |
Creates a message attached to the given chat room with a plain text content filled with the given message.
Introduced in 01/07/2020
message | text message in UTF8, nullptr if absent. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createReplyMessage | ( | const std::shared_ptr< linphone::ChatMessage > & | message | ) |
Creates a reply message attached to the given chat room with a particular message.
message | ChatMessage message to reply to. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::createVoiceRecordingMessage | ( | const std::shared_ptr< linphone::Recorder > & | recorder | ) |
Creates a chat message with a voice recording attached to the given chat room.
recorder | the Recorder object used to record the voice message. |
LINPHONECXX_PUBLIC void linphone::ChatRoom::deleteMessage | ( | const std::shared_ptr< linphone::ChatMessage > & | message | ) |
Delete a message from the chat room history.
message | The ChatMessage object to remove. |
LINPHONECXX_PUBLIC void linphone::ChatRoom::enableEphemeral | ( | bool | enable | ) |
Enable or disable the ephemeral message feature in the chat room.
Works only for flexisip-based chat room. An ephemeral message will automatically disappear from the sender and recipient's chatrooms after a specified timeout configurable with setEphemeralLifetime(). The timer starts when the message has been displayed at the recipent, which means:
enable | true if the ephemeral message feature is enabled, false otherwise. |
LINPHONECXX_PUBLIC bool linphone::ChatRoom::ephemeralEnabled | ( | ) | const |
Returns whether or not the ephemeral message feature is enabled in the chat room.
LINPHONECXX_PUBLIC bool linphone::ChatRoom::ephemeralSupportedByAllParticipants | ( | ) | const |
Uses linphone spec to check if all participants support ephemeral messages.
It doesn't prevent to send ephemeral messages in the room but those who don't support it won't delete messages after lifetime has expired.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::findMessage | ( | const std::string & | messageId | ) |
Gets the chat message sent or received in this chat room that matches the message_id.
messageId | The id of the message to find |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Participant> linphone::ChatRoom::findParticipant | ( | const std::shared_ptr< linphone::Address > & | address | ) | const |
Find a participant of a chat room from its address.
address | The Address to search in the list of participants of the chat room |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Call> linphone::ChatRoom::getCall | ( | ) | const |
Gets the current call associated to this chatroom if any To commit a message, use ChatMessage::send()
LINPHONECXX_PUBLIC unsigned int linphone::ChatRoom::getCapabilities | ( | ) | const |
Get the capabilities of a chat room.
LINPHONECXX_PUBLIC uint32_t linphone::ChatRoom::getChar | ( | ) |
When realtime text is enabled CallParams::realtimeTextEnabled(), LinphoneCoreIsComposingReceivedCb is call everytime a char is received from peer.
At the end of remote typing a regular ChatMessage is received with committed data from LinphoneCoreCbsMessageReceivedCb.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::Address> > linphone::ChatRoom::getComposingAddresses | ( | ) |
Gets the list of participants that are currently composing.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::ChatRoom::getConferenceAddress | ( | ) | const |
Get the conference address of the chat room.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Core> linphone::ChatRoom::getCore | ( | ) | const |
LINPHONECXX_PUBLIC time_t linphone::ChatRoom::getCreationTime | ( | ) | const |
Return the creation time for the chat room.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ChatRoomParams> linphone::ChatRoom::getCurrentParams | ( | ) | const |
Returns current parameters associated with the chat room.
This is typically the parameters passed at chat room chat_roomeation to linphone_core_chat_roomeate_chat_room() or some default parameters if no ChatRoomParams was explicitely passed during chat room chat_roomeation.
LINPHONECXX_PUBLIC long linphone::ChatRoom::getEphemeralLifetime | ( | ) | const |
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.
LINPHONECXX_PUBLIC EphemeralMode linphone::ChatRoom::getEphemeralMode | ( | ) | const |
Get the ephemeral mode of the chat room.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::ChatMessage> > linphone::ChatRoom::getHistory | ( | int | nbMessage | ) |
Gets nb_message most recent messages from chat_room chat room, sorted from oldest to most recent.
nbMessage | Number of message to retrieve. 0 means everything. |
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::EventLog> > linphone::ChatRoom::getHistoryEvents | ( | int | nbEvents | ) |
Gets nb_events most recent events from chat_room chat room, sorted from oldest to most recent.
nbEvents | Number of events to retrieve. 0 means everything. |
LINPHONECXX_PUBLIC int linphone::ChatRoom::getHistoryEventsSize | ( | ) |
Gets the number of events in a chat room.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::EventLog> > linphone::ChatRoom::getHistoryMessageEvents | ( | int | nbEvents | ) |
Gets nb_events most recent chat message events from chat_room chat room, sorted from oldest to most recent.
nbEvents | Number of events to retrieve. 0 means everything. |
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::ChatMessage> > linphone::ChatRoom::getHistoryRange | ( | int | begin, |
int | end | ||
) |
Gets the partial list of messages in the given range, sorted from oldest to most recent.
begin | The first message of the range to be retrieved. History most recent message has index 0. |
end | The last message of the range to be retrieved. History oldest message has index of history size - 1 (use getHistorySize() to retrieve history size) |
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::EventLog> > linphone::ChatRoom::getHistoryRangeEvents | ( | int | begin, |
int | end | ||
) |
Gets the partial list of events in the given range, sorted from oldest to most recent.
begin | The first event of the range to be retrieved. History most recent event has index 0. |
end | The last event of the range to be retrieved. History oldest event has index of history size - 1 |
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::EventLog> > linphone::ChatRoom::getHistoryRangeMessageEvents | ( | int | begin, |
int | end | ||
) |
Gets the partial list of chat message events in the given range, sorted from oldest to most recent.
begin | The first event of the range to be retrieved. History most recent event has index 0. |
end | The last event of the range to be retrieved. History oldest event has index of history size - 1 |
LINPHONECXX_PUBLIC int linphone::ChatRoom::getHistorySize | ( | ) |
Gets the number of messages in a chat room.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatMessage> linphone::ChatRoom::getLastMessageInHistory | ( | ) |
Gets the last chat message sent or received in this chat room.
LINPHONECXX_PUBLIC time_t linphone::ChatRoom::getLastUpdateTime | ( | ) | const |
Return the last updated time for the chat room.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::ChatRoom::getLocalAddress | ( | ) |
Get the local address associated to this chat room.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Participant> linphone::ChatRoom::getMe | ( | ) | const |
Get the participant representing myself in the chat room.
LINPHONECXX_PUBLIC bool linphone::ChatRoom::getMuted | ( | ) | const |
Gets if a chat room has been flagged as muted (not by default).
A muted chat room isn't used to compute unread messages total count.
LINPHONECXX_PUBLIC int linphone::ChatRoom::getNbParticipants | ( | ) | const |
Get the number of participants in the chat room (that is without ourselves).
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::Participant> > linphone::ChatRoom::getParticipants | ( | ) | const |
Get the list of participants of a chat room.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::ChatRoom::getPeerAddress | ( | ) |
Get the peer address associated to this chat room.
LINPHONECXX_PUBLIC SecurityLevel linphone::ChatRoom::getSecurityLevel | ( | ) |
Get the security level of a chat room.
LINPHONECXX_PUBLIC State linphone::ChatRoom::getState | ( | ) | const |
Get the state of the chat room.
LINPHONECXX_PUBLIC std::string linphone::ChatRoom::getSubject | ( | ) | const |
Get the subject of a chat room.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::ChatMessage> > linphone::ChatRoom::getUnreadHistory | ( | ) |
Gets all unread messages for this chat room, sorted from oldest to most recent.
LINPHONECXX_PUBLIC int linphone::ChatRoom::getUnreadMessagesCount | ( | ) |
Gets the number of unread messages in the chatroom.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED bool linphone::ChatRoom::hasBeenLeft | ( | ) | const |
Return whether or not the chat room has been left.
LINPHONECXX_PUBLIC bool linphone::ChatRoom::hasCapability | ( | int | mask | ) | const |
Check if a chat room has given capabilities.
mask | a LinphoneChatRoomCapabilitiesMask mask |
LINPHONECXX_PUBLIC bool linphone::ChatRoom::isEmpty | ( | ) |
Returns whether or not a ChatRoom has at least one ChatMessage or not.
LINPHONECXX_PUBLIC bool linphone::ChatRoom::isReadOnly | ( | ) | const |
Return whether or not a message can be sent using this chat room.
A chat room may be read only until it's created, or when it's a group you have left.
LINPHONECXX_PUBLIC bool linphone::ChatRoom::isRemoteComposing | ( | ) | const |
Tells whether the remote is currently composing a message.
LINPHONECXX_PUBLIC void linphone::ChatRoom::notifyParticipantDeviceRegistration | ( | const std::shared_ptr< const linphone::Address > & | participantDevice | ) |
Notify the chatroom that a participant device has just registered.
This function is meaningful only for server implementation of chatroom, and shall not by used by client applications.
participantDevice | list of the participant devices to be used by the group chat room |
LINPHONECXX_PUBLIC void linphone::ChatRoom::receiveChatMessage | ( | const std::shared_ptr< linphone::ChatMessage > & | message | ) |
Used to receive a chat message when using async mechanism with IM enchat_roomyption engine.
message | ChatMessage object |
LINPHONECXX_PUBLIC void linphone::ChatRoom::removeListener | ( | const std::shared_ptr< ChatRoomListener > & | listener | ) |
Remove a previously added listener from the ChatRoom instance.
listener | the application listener |
LINPHONECXX_PUBLIC void linphone::ChatRoom::removeParticipant | ( | const std::shared_ptr< linphone::Participant > & | participant | ) |
Remove a participant of a chat room.
participant | The participant to remove from the chat room |
LINPHONECXX_PUBLIC void linphone::ChatRoom::removeParticipants | ( | const std::list< std::shared_ptr< linphone::Participant >> & | participants | ) |
Remove several participants of a chat room at once.
participants | The participants to remove. |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setConferenceAddress | ( | const std::shared_ptr< linphone::Address > & | conferenceAddress | ) |
Set the conference address of a group chat room.
This function needs to be called from the LinphoneChatRoomCbsConferenceAddressGenerationCb callback and only there. This function is meaningful only for server implementation of chatroom, and shall not by used by client applications.
conferenceAddress | The conference Address to be used by the group chat room |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setEphemeralLifetime | ( | long | time | ) |
Set lifetime (in seconds) for all new ephemeral messages in the chat room.
After the message is read, it will be deleted after "time" seconds.
time | The ephemeral lifetime, default is 0 (disabled) |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setEphemeralMode | ( | EphemeralMode | mode | ) |
Set the ephemeral mode of the chat room.
mode | The ephemeral mode EphemeralMode |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setMuted | ( | bool | muted | ) |
Sets if a chat room should be considered as muted or not.
A muted chat room isn't used to compute unread messages total count.
muted | true to flag it as muted, false to un-mute it. |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setParticipantAdminStatus | ( | const std::shared_ptr< linphone::Participant > & | participant, |
bool | isAdmin | ||
) |
Change the admin status of a participant of a chat room (you need to be an admin yourself to do this).
participant | The Participant for which to change the admin status |
isAdmin | A boolean value telling whether the participant should now be an admin or not |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setParticipantDevices | ( | const std::shared_ptr< linphone::Address > & | participantAddress, |
const std::list< std::shared_ptr< linphone::ParticipantDeviceIdentity >> & | deviceIdentities | ||
) |
Set the list of participant devices in the form of SIP URIs with GRUUs for a given participant.
This function is meaningful only for server implementation of chatroom, and shall not by used by client applications.
participantAddress | The participant address |
deviceIdentities | List of the participant devices to be used by the group chat room |
LINPHONECXX_PUBLIC void linphone::ChatRoom::setSubject | ( | const std::string & | subject | ) |
Set the subject of a chat room.
subject | The new subject to set for the chat room |
|
static |