From d8568491eb9d571b1fba761f11308950eb79eb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Thu, 6 Apr 2017 12:02:03 +0200 Subject: [PATCH] Add linphone_core_create_account_creator() --- coreapi/account_creator.c | 10 +++++++++- include/linphone/core.h | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 8096fe99a..0c6a3abd8 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -314,7 +314,7 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneAccountCreator, belle_sip_object_t, FALSE ); -LinphoneAccountCreator * linphone_account_creator_new(LinphoneCore *core, const char *xmlrpc_url) { +LinphoneAccountCreator * _linphone_account_creator_new(LinphoneCore *core, const char *xmlrpc_url) { LinphoneAccountCreator *creator; const char* domain = lp_config_get_string(core->config, "assistant", "domain", NULL); creator = belle_sip_object_new(LinphoneAccountCreator); @@ -331,6 +331,14 @@ LinphoneAccountCreator * linphone_account_creator_new(LinphoneCore *core, const return creator; } +LinphoneAccountCreator * linphone_account_creator_new(LinphoneCore *core, const char *xmlrpc_url) { + return _linphone_account_creator_new(core, xmlrpc_url); +} + +LinphoneAccountCreator * linphone_core_create_account_creator(LinphoneCore *core, const char *xmlrpc_url) { + return _linphone_account_creator_new(core, xmlrpc_url); +} + LinphoneAccountCreator * linphone_account_creator_ref(LinphoneAccountCreator *creator) { belle_sip_object_ref(creator); return creator; diff --git a/include/linphone/core.h b/include/linphone/core.h index 3669b438f..d98c4a33f 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -4890,6 +4890,16 @@ LINPHONE_PUBLIC LinphoneNatPolicy * linphone_core_create_nat_policy(LinphoneCore LINPHONE_PUBLIC LinphoneNatPolicy * linphone_core_create_nat_policy_from_config(LinphoneCore *lc, const char *ref); +/** + * Create a LinphoneAccountCreator and set Linphone Request callbacks. + * @param[in] core The LinphoneCore used for the XML-RPC communication + * @param[in] xmlrpc_url The URL to the XML-RPC server. Must be NON NULL. + * @return The new LinphoneAccountCreator object. + * @ingroup account_creator +**/ +LINPHONE_PUBLIC LinphoneAccountCreator * linphone_core_create_account_creator(LinphoneCore *core, const char *xmlrpc_url); + + #ifdef __cplusplus } #endif