Commit f23cfe27 authored by Ronan's avatar Ronan

feat(c-core): wrap find one to one chat room function

parent b0f2d805
......@@ -106,15 +106,26 @@ LinphoneChatRoom *linphone_core_get_chat_room_from_uri(LinphoneCore *lc, const c
LinphoneChatRoom *linphone_core_find_chat_room(
const LinphoneCore *lc,
const LinphoneAddress *peerAddr,
const LinphoneAddress *localAddr
const LinphoneAddress *peer_addr,
const LinphoneAddress *local_addr
) {
return L_GET_C_BACK_PTR(lc->cppCore->findChatRoom(LinphonePrivate::ChatRoomId(
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(peerAddr)),
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(localAddr))
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(peer_addr)),
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(local_addr))
)));
}
LinphoneChatRoom *linphone_core_find_one_to_one_chat_room (
const LinphoneCore *lc,
const LinphoneAddress *local_addr,
const LinphoneAddress *participant_addr
) {
return L_GET_C_BACK_PTR(lc->cppCore->findOneToOneChatRoom(
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(local_addr)),
LinphonePrivate::IdentityAddress(*L_GET_CPP_PTR_FROM_C_OBJECT(participant_addr))
));
}
int linphone_core_message_received(LinphoneCore *lc, LinphonePrivate::SalOp *op, const SalMessage *sal_msg) {
LinphoneReason reason = LinphoneReasonNotAcceptable;
const char *peerAddress;
......
......@@ -4962,14 +4962,28 @@ LINPHONE_PUBLIC LinphoneChatRoom *linphone_core_get_chat_room_from_uri(LinphoneC
* Find a chat room.
* No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
* @param lc the linphone core
* @param peerAddr a linphone address.
* @param localAddr a linphone address.
* @param peer_addr a linphone address.
* @param local_addr a linphone address.
* @return #LinphoneChatRoom where messaging can take place.
**/
LINPHONE_PUBLIC LinphoneChatRoom *linphone_core_find_chat_room (
const LinphoneCore *lc,
const LinphoneAddress *peerAddr,
const LinphoneAddress *localAddr
const LinphoneAddress *peer_addr,
const LinphoneAddress *local_addr
);
/**
* Find a one to one chat room.
* No reference is transfered to the application. The LinphoneCore keeps a reference on the chat room.
* @param lc the linphone core
* @param local_addr a linphone address.
* @param participant_addr a linphone address.
* @return #LinphoneChatRoom where messaging can take place.
**/
LINPHONE_PUBLIC LinphoneChatRoom *linphone_core_find_one_to_one_chat_room (
const LinphoneCore *lc,
const LinphoneAddress *local_addr,
const LinphoneAddress *participant_addr
);
/**
......
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