mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
feat(c-core): wrap find one to one chat room function
This commit is contained in:
parent
b0f2d80547
commit
f23cfe2795
2 changed files with 33 additions and 8 deletions
|
|
@ -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
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue