diff --git a/include/linphone/wrapper_utils.h b/include/linphone/wrapper_utils.h index 35c335595e3e66f836616d75fefea1d7bd5bd88a..2905f7b5e5df22020ee233b7b5f964959a82bbd8 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 8c4745b0f426f71cf61f41b92b7ff529e0d01f51..45626f2d93520ad013ae01f96d0a8b2905de8aee 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 +}