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
e1123620
Commit
e1123620
authored
Apr 28, 2017
by
Ronan
Browse files
feat(vcard): add a clone method
parent
b7dc359f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
coreapi/vcard.cc
coreapi/vcard.cc
+13
-0
include/linphone/vcard.h
include/linphone/vcard.h
+7
-0
No files found.
coreapi/vcard.cc
View file @
e1123620
...
...
@@ -118,6 +118,19 @@ void linphone_vcard_unref(LinphoneVcard *vCard) {
belle_sip_object_unref
((
belle_sip_object_t
*
)
vCard
);
}
LinphoneVcard
*
linphone_vcard_clone
(
const
LinphoneVcard
*
vCard
)
{
LinphoneVcard
*
copy
=
belle_sip_object_new
(
LinphoneVcard
);
copy
->
belCard
=
belcard
::
BelCardParser
::
getInstance
()
->
parseOne
(
vCard
->
belCard
->
toFoldedString
());
if
(
vCard
->
url
)
copy
->
url
=
ms_strdup
(
vCard
->
url
);
if
(
vCard
->
etag
)
copy
->
etag
=
ms_strdup
(
vCard
->
etag
);
memcpy
(
copy
->
md5
,
vCard
->
md5
,
sizeof
*
vCard
->
md5
);
return
copy
;
}
bctbx_list_t
*
linphone_vcard_context_get_vcard_list_from_file
(
LinphoneVcardContext
*
context
,
const
char
*
filename
)
{
bctbx_list_t
*
result
=
NULL
;
if
(
context
&&
filename
)
{
...
...
include/linphone/vcard.h
View file @
e1123620
...
...
@@ -65,6 +65,13 @@ LINPHONE_PUBLIC LinphoneVcard *linphone_vcard_ref(LinphoneVcard *vCard);
*/
LINPHONE_PUBLIC
void
linphone_vcard_unref
(
LinphoneVcard
*
vCard
);
/**
* Clone a #LinphoneVcard.
* @param[in] vCard LinphoneVcard object
* @return a new LinphoneVcard object
*/
LINPHONE_PUBLIC
LinphoneVcard
*
linphone_vcard_clone
(
const
LinphoneVcard
*
vCard
);
/**
* Returns the vCard4 representation of the LinphoneVcard.
* @param[in] vCard the LinphoneVcard
...
...
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