Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
3eeb0974
Commit
3eeb0974
authored
Dec 17, 2015
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compilation when belcard is not found
parent
860ee180
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
0 deletions
+87
-0
coreapi/Makefile.am
coreapi/Makefile.am
+4
-0
coreapi/friend.c
coreapi/friend.c
+8
-0
coreapi/vcard_stubs.c
coreapi/vcard_stubs.c
+71
-0
tester/vcard_tester.c
tester/vcard_tester.c
+4
-0
No files found.
coreapi/Makefile.am
View file @
3eeb0974
...
...
@@ -114,8 +114,12 @@ else
liblinphone_la_SOURCES
+=
linphone_tunnel_stubs.c linphone_tunnel.h
endif
if
BUILD_VCARD
liblinphone_la_SOURCES
+=
vcard.cc vcard.h
liblinphone_la_CXXFLAGS
=
-std
=
c++11
else
liblinphone_la_SOURCES
+=
vcard_stubs.c vcard.h
endif
liblinphone_la_LDFLAGS
=
-version-info
$(LIBLINPHONE_SO_VERSION)
-no-undefined
...
...
coreapi/friend.c
View file @
3eeb0974
...
...
@@ -987,10 +987,18 @@ static int create_friend(void *data, int argc, char **argv, char **colName) {
MSList
**
list
=
(
MSList
**
)
data
;
LinphoneFriend
*
lf
=
NULL
;
LinphoneVCard
*
vcard
=
NULL
;
unsigned
int
storage_id
=
atoi
(
argv
[
0
]);
vcard
=
linphone_vcard_new_from_vcard4_buffer
(
argv
[
1
]);
lf
=
linphone_friend_new_from_vcard
(
vcard
);
if
(
!
lf
)
{
lf
=
linphone_friend_new
();
//TODO
}
//TODO
lf
->
storage_id
=
storage_id
;
*
list
=
ms_list_append
(
*
list
,
linphone_friend_ref
(
lf
));
linphone_friend_unref
(
lf
);
return
0
;
...
...
coreapi/vcard_stubs.c
0 → 100644
View file @
3eeb0974
/*
vcard_stubs.c
Copyright (C) 2015 Belledonne Communications SARL
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "vcard.h"
struct
_LinphoneVCard
{
};
LinphoneVCard
*
linphone_vcard_new
(
void
)
{
return
NULL
;
}
void
linphone_vcard_free
(
LinphoneVCard
*
vCard
)
{
}
MSList
*
linphone_vcard_list_from_vcard4_file
(
const
char
*
filename
)
{
return
NULL
;
}
MSList
*
linphone_vcard_list_from_vcard4_buffer
(
const
char
*
buffer
)
{
return
NULL
;
}
LinphoneVCard
*
linphone_vcard_new_from_vcard4_buffer
(
const
char
*
buffer
)
{
return
NULL
;
}
const
char
*
linphone_vcard_as_vcard4_string
(
LinphoneVCard
*
vCard
)
{
return
NULL
;
}
void
linphone_vcard_set_full_name
(
LinphoneVCard
*
vCard
,
const
char
*
name
)
{
}
const
char
*
linphone_vcard_get_full_name
(
const
LinphoneVCard
*
vCard
)
{
return
NULL
;
}
void
linphone_vcard_add_sip_address
(
LinphoneVCard
*
vCard
,
const
char
*
sip_address
)
{
}
void
linphone_vcard_remove_sip_address
(
LinphoneVCard
*
vCard
,
const
char
*
sip_address
)
{
}
void
linphone_vcard_edit_main_sip_address
(
LinphoneVCard
*
vCard
,
const
char
*
sip_address
)
{
}
MSList
*
linphone_vcard_get_sip_addresses
(
const
LinphoneVCard
*
vCard
)
{
return
NULL
;
}
\ No newline at end of file
tester/vcard_tester.c
View file @
3eeb0974
...
...
@@ -22,6 +22,7 @@
#include <time.h>
#if BUILD_VCARD
static
char
*
create_filepath
(
const
char
*
dir
,
const
char
*
filename
,
const
char
*
ext
)
{
return
ms_strdup_printf
(
"%s/%s.%s"
,
dir
,
filename
,
ext
);
}
...
...
@@ -161,8 +162,10 @@ static void friends_sqlite_storage(void) {
linphone_core_manager_destroy
(
manager
);
}
#endif
#endif
test_t
vcard_tests
[]
=
{
#if BUILD_VCARD
{
"Import / Export friends from vCards"
,
linphone_vcard_import_export_friends_test
},
{
"Import a lot of friends from vCards"
,
linphone_vcard_import_a_lot_of_friends_test
},
#ifdef FRIENDS_SQL_STORAGE_ENABLED
...
...
@@ -170,6 +173,7 @@ test_t vcard_tests[] = {
{
"Friends storage migration from rc to db"
,
friends_migration
},
{
"Friends storage in sqlite database"
,
friends_sqlite_storage
},
#endif
#endif
};
test_suite_t
vcard_test_suite
=
{
...
...
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