From 3fbe2315948d0dac660c5aed59136b0d826fc684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Wed, 18 Oct 2017 14:54:52 +0200 Subject: [PATCH] Fix C++ wrapper generation when the VCard support of Liblinphone is disabled. --- coreapi/vcard_stubs.c | 9 +++++++++ wrappers/cpp/class_header.mustache | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/coreapi/vcard_stubs.c b/coreapi/vcard_stubs.c index 90bebe896..496898158 100644 --- a/coreapi/vcard_stubs.c +++ b/coreapi/vcard_stubs.c @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "linphone/core.h" +#include "linphone/wrapper_utils.h" #include "vcard_private.h" struct _LinphoneVcardContext { @@ -179,3 +180,11 @@ bool_t linphone_core_vcard_supported(void) { void linphone_vcard_clean_cache(LinphoneVcard *vCard) { } + +void *linphone_vcard_get_belcard(LinphoneVcard *vCard) { + return NULL; +} + +LinphoneVcard *linphone_vcard_clone(const LinphoneVcard *vCard) { + return NULL; +} diff --git a/wrappers/cpp/class_header.mustache b/wrappers/cpp/class_header.mustache index b81329836..ae8f3394c 100644 --- a/wrappers/cpp/class_header.mustache +++ b/wrappers/cpp/class_header.mustache @@ -29,13 +29,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. {{/includes}} #include "object.hh" -{{#_class}}{{#isVcard}} -#include -{{/isVcard}}{{/_class}} {{#_class}}{{#isfactory}} #include "config.hh" {{/isfactory}}{{/_class}} +{{#_class}}{{#isVcard}} +namespace belcard { +class BelCard; +} +{{/isVcard}}{{/_class}} + {{#_class}} {{#isNotListener}}