From d8e2c6c687fe799b2c36306d7fa836931053f577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 16 Oct 2017 11:39:48 +0200 Subject: [PATCH] [C++ wrapper] Fix generation of linphone::DialPlan class --- include/linphone/wrapper_utils.h | 12 ++++++++++++ src/c-wrapper/api/c-dial-plan.cpp | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/include/linphone/wrapper_utils.h b/include/linphone/wrapper_utils.h index 35c335595..2905f7b5e 100644 --- a/include/linphone/wrapper_utils.h +++ b/include/linphone/wrapper_utils.h @@ -83,6 +83,18 @@ LINPHONE_PUBLIC void linphone_chat_message_resend_2(LinphoneChatMessage *msg); */ LINPHONE_PUBLIC void *linphone_vcard_get_belcard(LinphoneVcard *vcard); + +/** + * @brief Increases the reference counter of #LinphoneDialPlan objects. + */ +LINPHONE_PUBLIC LinphoneDialPlan *linphone_dial_plan_ref(LinphoneDialPlan *dp); + +/** + * @brief Decreases the reference counter of #LinphoneDialPaln objects. + */ +LINPHONE_PUBLIC void linphone_dial_plan_unref(LinphoneDialPlan *dp); + + /** * @} */ diff --git a/src/c-wrapper/api/c-dial-plan.cpp b/src/c-wrapper/api/c-dial-plan.cpp index 8c4745b0f..45626f2d9 100644 --- a/src/c-wrapper/api/c-dial-plan.cpp +++ b/src/c-wrapper/api/c-dial-plan.cpp @@ -29,6 +29,14 @@ using namespace std; L_DECLARE_C_OBJECT_IMPL(DialPlan); +LinphoneDialPlan *linphone_dial_plan_ref(LinphoneDialPlan *dp) { + return (LinphoneDialPlan *)belle_sip_object_ref(dp); +} + +void linphone_dial_plan_unref(LinphoneDialPlan *dp) { + belle_sip_object_unref(dp); +} + const char * linphone_dial_plan_get_country(const LinphoneDialPlan *dp) { return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(dp)->getCountry()); } @@ -78,4 +86,4 @@ const bctbx_list_t * linphone_dial_plan_get_all_list() { bool_t linphone_dial_plan_is_generic(const LinphoneDialPlan *ccc) { return L_GET_CPP_PTR_FROM_C_OBJECT(ccc)->isGeneric(); -} \ No newline at end of file +}