mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 15:48:09 +00:00
Added a C method to get a list of composing addresses in a chat room
This commit is contained in:
parent
fde89d36e2
commit
d9964748fb
2 changed files with 16 additions and 0 deletions
|
|
@ -333,6 +333,13 @@ LINPHONE_PUBLIC void linphone_chat_room_set_participant_admin_status (LinphoneCh
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_room_set_subject (LinphoneChatRoom *cr, const char *subject);
|
||||
|
||||
/**
|
||||
* Gets the list of participants that are currently composing
|
||||
* @param[in] cr A LinphoneChatRoom object
|
||||
* @return \bctbx_list{LinphoneAddress *} list of addresses that are in the is_composing state
|
||||
*/
|
||||
LINPHONE_PUBLIC bctbx_list_t * linphone_chat_room_get_composing_addresses(LinphoneChatRoom *cr);
|
||||
|
||||
/**
|
||||
* Returns back pointer to #LinphoneCore object.
|
||||
* @deprecated use linphone_chat_room_get_core()
|
||||
|
|
|
|||
|
|
@ -274,6 +274,15 @@ void linphone_chat_room_set_subject (LinphoneChatRoom *cr, const char *subject)
|
|||
L_GET_CPP_PTR_FROM_C_OBJECT(cr)->setSubject(L_C_TO_STRING(subject));
|
||||
}
|
||||
|
||||
bctbx_list_t * linphone_chat_room_get_composing_addresses(LinphoneChatRoom *cr) {
|
||||
LinphonePrivate::ChatRoomPrivate *room = L_GET_PRIVATE_FROM_C_OBJECT(cr);
|
||||
bctbx_list_t *result = NULL;
|
||||
for (auto i = room->remoteIsComposing.begin(); i != room->remoteIsComposing.end(); ++i) {
|
||||
result = bctbx_list_append(result, linphone_address_new((*i).c_str()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Reference and user data handling functions.
|
||||
// =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue