Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
f23cfe27
Commit
f23cfe27
authored
Nov 30, 2017
by
Ronan
Browse files
feat(c-core): wrap find one to one chat room function
parent
b0f2d805
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
coreapi/chat.c
coreapi/chat.c
+15
-4
include/linphone/core.h
include/linphone/core.h
+18
-4
No files found.
coreapi/chat.c
View file @
f23cfe27
...
...
@@ -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
*
peer
A
ddr
,
const
LinphoneAddress
*
local
A
ddr
const
LinphoneAddress
*
peer
_a
ddr
,
const
LinphoneAddress
*
local
_a
ddr
)
{
return
L_GET_C_BACK_PTR
(
lc
->
cppCore
->
findChatRoom
(
LinphonePrivate
::
ChatRoomId
(
LinphonePrivate
::
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
peer
A
ddr
)),
LinphonePrivate
::
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
local
A
ddr
))
LinphonePrivate
::
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
peer
_a
ddr
)),
LinphonePrivate
::
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
local
_a
ddr
))
)));
}
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
;
...
...
include/linphone/core.h
View file @
f23cfe27
...
...
@@ -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 peer
A
ddr a linphone address.
* @param local
A
ddr a linphone address.
* @param peer
_a
ddr a linphone address.
* @param local
_a
ddr 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
);
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment