Commit d9964748 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added a C method to get a list of composing addresses in a chat room

parent fde89d36
......@@ -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.
// =============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment