Add missing linphone_chat_room_get_state() API.

This commit is contained in:
Ghislain MARY 2017-09-21 10:13:09 +02:00
parent f2daaf7df1
commit 7d6d2da2fc
2 changed files with 11 additions and 0 deletions

View file

@ -230,6 +230,13 @@ LINPHONE_PUBLIC LinphoneCall *linphone_chat_room_get_call(const LinphoneChatRoom
*/
LINPHONE_PUBLIC LinphoneChatRoomCbs * linphone_chat_room_get_callbacks (const LinphoneChatRoom *cr);
/**
* Get the state of the chat room.
* @param[in] cr LinphoneChatRoom object
* @return The state of the chat room
*/
LINPHONE_PUBLIC LinphoneChatRoomState linphone_chat_room_get_state (const LinphoneChatRoom *cr);
/**
* Add a participant to a chat room. This may fail if this type of chat room does not handle participants.
* Use linphone_chat_room_can_handle_participants() to know if this chat room handles participants.

View file

@ -209,6 +209,10 @@ LinphoneChatRoomCbs *linphone_chat_room_get_callbacks (const LinphoneChatRoom *c
return cr->cbs;
}
LinphoneChatRoomState linphone_chat_room_get_state (const LinphoneChatRoom *cr) {
return (LinphoneChatRoomState)GET_CPP_PTR(cr)->getState();
}
LinphoneParticipant *linphone_chat_room_add_participant (LinphoneChatRoom *cr, const LinphoneAddress *addr) {
return L_GET_C_BACK_PTR(GET_CPP_PTR(cr)->addParticipant(
*L_GET_CPP_PTR_FROM_C_STRUCT(addr, Address), nullptr, false),