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
144790b4
Commit
144790b4
authored
Dec 04, 2017
by
Sylvain Berfini
🐮
Browse files
Added linphone_address_remove_param method
parent
d8b1d318
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
1 deletion
+25
-1
coreapi/friendlist.c
coreapi/friendlist.c
+3
-1
include/linphone/api/c-address.h
include/linphone/api/c-address.h
+7
-0
src/address/address.cpp
src/address/address.cpp
+10
-0
src/address/address.h
src/address/address.h
+1
-0
src/c-wrapper/api/c-address.cpp
src/c-wrapper/api/c-address.cpp
+4
-0
No files found.
coreapi/friendlist.c
View file @
144790b4
...
...
@@ -763,7 +763,9 @@ void linphone_friend_list_synchronize_friends_from_server(LinphoneFriendList *li
LinphoneFriend
*
linphone_friend_list_find_friend_by_address
(
const
LinphoneFriendList
*
list
,
const
LinphoneAddress
*
address
)
{
LinphoneAddress
*
clean_addr
=
linphone_address_clone
(
address
);
LinphoneFriend
*
lf
;
linphone_address_set_uri_param
(
clean_addr
,
"gr"
,
NULL
);
// Remove any gruu param
if
(
linphone_address_has_param
(
clean_addr
,
"gr"
))
{
linphone_address_remove_uri_param
(
clean_addr
,
"gr"
);
}
lf
=
linphone_friend_list_find_friend_by_uri
(
list
,
linphone_address_as_string_uri_only
(
clean_addr
));
linphone_address_unref
(
clean_addr
);
return
lf
;
...
...
include/linphone/api/c-address.h
View file @
144790b4
...
...
@@ -254,6 +254,13 @@ LINPHONE_PUBLIC void linphone_address_set_uri_param (LinphoneAddress *address, c
LINPHONE_PUBLIC
void
linphone_address_set_uri_params
(
LinphoneAddress
*
address
,
const
char
*
params
);
/**
* Removes the value of a parameter of the URI of the address
* @param[in] address LinphoneAddress object
* @param[in] uri_param_name The name of the parameter
*/
LINPHONE_PUBLIC
void
linphone_address_remove_uri_param
(
LinphoneAddress
*
address
,
const
char
*
uri_param_name
);
/**
* Destroys a LinphoneAddress object (actually calls linphone_address_unref()).
* @deprecated Use linphone_address_unref() instead
...
...
src/address/address.cpp
View file @
144790b4
...
...
@@ -403,4 +403,14 @@ bool Address::setUriParams (const string &uriParams) {
return
true
;
}
bool
Address
::
removeUriParam
(
const
string
&
uriParamName
)
{
L_D
();
if
(
!
d
->
internalAddress
)
return
false
;
sal_address_remove_uri_param
(
d
->
internalAddress
,
L_STRING_TO_C
(
uriParamName
));
return
true
;
}
LINPHONE_END_NAMESPACE
src/address/address.h
View file @
144790b4
...
...
@@ -101,6 +101,7 @@ public:
const
std
::
string
&
getUriParamValue
(
const
std
::
string
&
uriParamName
)
const
;
bool
setUriParam
(
const
std
::
string
&
uriParamName
,
const
std
::
string
&
uriParamValue
=
""
);
bool
setUriParams
(
const
std
::
string
&
uriParams
);
bool
removeUriParam
(
const
std
::
string
&
uriParamName
);
private:
L_DECLARE_PRIVATE
(
Address
);
...
...
src/c-wrapper/api/c-address.cpp
View file @
144790b4
...
...
@@ -186,6 +186,10 @@ void linphone_address_set_uri_params (LinphoneAddress *address, const char *para
L_GET_CPP_PTR_FROM_C_OBJECT
(
address
)
->
setUriParams
(
L_C_TO_STRING
(
params
));
}
void
linphone_address_remove_uri_param
(
LinphoneAddress
*
address
,
const
char
*
uri_param_name
)
{
L_GET_CPP_PTR_FROM_C_OBJECT
(
address
)
->
removeUriParam
(
L_C_TO_STRING
(
uri_param_name
));
}
void
linphone_address_destroy
(
LinphoneAddress
*
address
)
{
belle_sip_object_unref
(
address
);
}
...
...
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