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

Added hasCapability method on C ChatRoom

parent d5347f4b
...@@ -319,6 +319,14 @@ LINPHONE_PUBLIC LinphoneParticipant *linphone_chat_room_find_participant (const ...@@ -319,6 +319,14 @@ LINPHONE_PUBLIC LinphoneParticipant *linphone_chat_room_find_participant (const
*/ */
LINPHONE_PUBLIC LinphoneChatRoomCapabilitiesMask linphone_chat_room_get_capabilities (const LinphoneChatRoom *cr); LINPHONE_PUBLIC LinphoneChatRoomCapabilitiesMask linphone_chat_room_get_capabilities (const LinphoneChatRoom *cr);
/**
* Check if a chat room has given capabilities.
* @param[in] cr A LinphoneChatRoom object
* @param[in] mask A Capabilities mask
* @return True if the mask matches, false otherwise
*/
LINPHONE_PUBLIC bool_t linphone_chat_room_has_capability(const LinphoneChatRoom *cr, LinphoneChatRoomCapabilitiesMask mask);
/** /**
* Get the conference address of the chat room. * Get the conference address of the chat room.
* @param[in] cr A LinphoneChatRoom object * @param[in] cr A LinphoneChatRoom object
......
...@@ -279,6 +279,11 @@ LinphoneChatRoomCapabilitiesMask linphone_chat_room_get_capabilities (const Linp ...@@ -279,6 +279,11 @@ LinphoneChatRoomCapabilitiesMask linphone_chat_room_get_capabilities (const Linp
return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getCapabilities(); return L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getCapabilities();
} }
bool_t linphone_chat_room_has_capability(const LinphoneChatRoom *cr, LinphoneChatRoomCapabilitiesMask mask) {
if (L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getCapabilities() & mask) return true;
return false;
}
const LinphoneAddress *linphone_chat_room_get_conference_address (const LinphoneChatRoom *cr) { const LinphoneAddress *linphone_chat_room_get_conference_address (const LinphoneChatRoom *cr) {
if (cr->conferenceAddressCache) if (cr->conferenceAddressCache)
linphone_address_unref(cr->conferenceAddressCache); linphone_address_unref(cr->conferenceAddressCache);
......
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