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
14311c87
Commit
14311c87
authored
Oct 03, 2017
by
Ghislain MARY
Browse files
Hacks::contactHasParam() can now be removed thanks to an update of belle-sip.
parent
9f9da0fd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
src/chat/client-group-chat-room.cpp
src/chat/client-group-chat-room.cpp
+1
-1
src/conference/session/call-session-p.h
src/conference/session/call-session-p.h
+1
-0
src/conference/session/call-session.cpp
src/conference/session/call-session.cpp
+11
-0
src/conference/session/call-session.h
src/conference/session/call-session.h
+1
-0
src/hacks/hacks.cpp
src/hacks/hacks.cpp
+0
-12
src/hacks/hacks.h
src/hacks/hacks.h
+0
-1
No files found.
src/chat/client-group-chat-room.cpp
View file @
14311c87
...
...
@@ -200,7 +200,7 @@ void ClientGroupChatRoom::onCallSessionStateChanged (const CallSession &session,
Address
addr
(
session
.
getRemoteContact
());
addr
.
clean
();
onConferenceCreated
(
addr
);
if
(
Hacks
::
contactHasParam
(
session
.
getRemoteContact
(),
"isfocus"
))
if
(
session
.
getRemoteContact
Address
()
->
hasParam
(
"isfocus"
))
eventHandler
->
subscribe
(
conferenceAddress
);
}
}
...
...
src/conference/session/call-session-p.h
View file @
14311c87
...
...
@@ -86,6 +86,7 @@ protected:
CallSessionParams
*
params
=
nullptr
;
mutable
CallSessionParams
*
currentParams
=
nullptr
;
CallSessionParams
*
remoteParams
=
nullptr
;
mutable
Address
remoteContactAddress
;
std
::
string
subject
;
LinphoneCallDir
direction
=
LinphoneCallOutgoing
;
...
...
src/conference/session/call-session.cpp
View file @
14311c87
...
...
@@ -1002,6 +1002,17 @@ string CallSession::getRemoteContact () const {
return
string
();
}
const
Address
*
CallSession
::
getRemoteContactAddress
()
const
{
L_D
();
if
(
!
d
->
op
)
{
return
nullptr
;
}
char
*
addrStr
=
sal_address_as_string
(
d
->
op
->
get_remote_contact_address
());
d
->
remoteContactAddress
=
Address
(
addrStr
);
bctbx_free
(
addrStr
);
return
&
d
->
remoteContactAddress
;
}
const
CallSessionParams
*
CallSession
::
getRemoteParams
()
{
L_D
();
if
(
d
->
op
){
...
...
src/conference/session/call-session.h
View file @
14311c87
...
...
@@ -67,6 +67,7 @@ public:
const
Address
&
getRemoteAddress
()
const
;
std
::
string
getRemoteAddressAsString
()
const
;
std
::
string
getRemoteContact
()
const
;
const
Address
*
getRemoteContactAddress
()
const
;
const
CallSessionParams
*
getRemoteParams
();
LinphoneCallState
getState
()
const
;
...
...
src/hacks/hacks.cpp
View file @
14311c87
...
...
@@ -30,16 +30,4 @@ LINPHONE_BEGIN_NAMESPACE
// -----------------------------------------------------------------------------
bool
Hacks
::
contactHasParam
(
const
string
&
contact
,
const
string
&
paramName
)
{
// This is very ugly!!! The handling of Contact headers and addresses is a real
// crap that really needs to be reworked. Meanwhile, we cannot get the params on the
// remote contact address and need to forge and parse a contact header.
ostringstream
os
;
os
<<
"Contact: "
<<
contact
;
belle_sip_header_contact_t
*
contactHeader
=
belle_sip_header_contact_parse
(
os
.
str
().
c_str
());
bool
result
=
belle_sip_parameters_has_parameter
(
BELLE_SIP_PARAMETERS
(
contactHeader
),
paramName
.
c_str
());
belle_sip_object_unref
(
contactHeader
);
return
result
;
}
LINPHONE_END_NAMESPACE
src/hacks/hacks.h
View file @
14311c87
...
...
@@ -31,7 +31,6 @@ LINPHONE_BEGIN_NAMESPACE
// can be located more easily.
class
Hacks
{
public:
static
bool
contactHasParam
(
const
std
::
string
&
contact
,
const
std
::
string
&
paramName
);
private:
Hacks
()
=
default
;
...
...
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