From 7d6d2da2fcac6ad9b1e19a58cc980e4ab5393d19 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 21 Sep 2017 10:13:09 +0200 Subject: [PATCH] Add missing linphone_chat_room_get_state() API. --- include/linphone/api/c-chat-room.h | 7 +++++++ src/c-wrapper/api/c-chat-room.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/include/linphone/api/c-chat-room.h b/include/linphone/api/c-chat-room.h index 075abca35..b6071d0da 100644 --- a/include/linphone/api/c-chat-room.h +++ b/include/linphone/api/c-chat-room.h @@ -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. diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index 65bdf0232..60158d4a6 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -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),