diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 96bb06105..1d9786313 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5962,6 +5962,10 @@ LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *add return linphone_address_new(address); } +LinphoneXmlRpcSession * linphone_core_create_xml_rpc_session(LinphoneCore *lc, const char *url) { + return linphone_xml_rpc_session_new(lc, url); +} + static void linphone_core_uninit(LinphoneCore *lc) { bctbx_list_t *elem = NULL; diff --git a/coreapi/xmlrpc.c b/coreapi/xmlrpc.c index 9410ae309..368e6c622 100644 --- a/coreapi/xmlrpc.c +++ b/coreapi/xmlrpc.c @@ -383,6 +383,10 @@ void linphone_xml_rpc_session_set_user_data(LinphoneXmlRpcSession *session, void session->user_data = ud; } +LinphoneXmlRpcRequest * linphone_xml_rpc_session_create_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcArgType return_type, const char *method) { + return linphone_xml_rpc_request_new(return_type, method); +} + void linphone_xml_rpc_session_send_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcRequest *request) { belle_http_request_listener_callbacks_t cbs = { 0 }; belle_http_request_listener_t *l; diff --git a/include/linphone/core.h b/include/linphone/core.h index 3e06c01a0..68dee15fc 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -5369,6 +5369,15 @@ LINPHONE_PUBLIC LinphoneNatPolicy * linphone_core_create_nat_policy_from_config( **/ LINPHONE_PUBLIC LinphoneAccountCreator * linphone_core_create_account_creator(LinphoneCore *core, const char *xmlrpc_url); +/** + * Create a LinphoneXmlRpcSession for a given url. + * @param[in] lc The LinphoneCore used for the XML-RPC communication + * @param[in] url The URL to the XML-RPC server. Must be NON NULL. + * @return The new LinphoneXmlRpcSession object. + * @ingroup misc +**/ +LINPHONE_PUBLIC LinphoneXmlRpcSession * linphone_core_create_xml_rpc_session(LinphoneCore *lc, const char *url); + #ifdef __cplusplus } diff --git a/include/linphone/xmlrpc.h b/include/linphone/xmlrpc.h index 36283bd15..67f8df2ad 100644 --- a/include/linphone/xmlrpc.h +++ b/include/linphone/xmlrpc.h @@ -208,6 +208,15 @@ LINPHONE_PUBLIC LinphoneXmlRpcRequestCbsResponseCb linphone_xml_rpc_request_cbs_ **/ LINPHONE_PUBLIC void linphone_xml_rpc_request_cbs_set_response(LinphoneXmlRpcRequestCbs *cbs, LinphoneXmlRpcRequestCbsResponseCb cb); +/** + * Creates a LinphoneXmlRpcRequest from a LinphoneXmlRpcSession + * @param[in] session the LinphoneXmlRpcSession + * @param[in] return_type the return type of the request as a LinphoneXmlRpcArgType + * @param[in] method the function name to call + * @return a LinphoneXmlRpcRequest object + */ +LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_session_create_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcArgType return_type, const char *method); + /** * @} */ diff --git a/wrappers/java/migration.sh b/wrappers/java/migration.sh index 3ffdd48ab..1f0570779 100644 --- a/wrappers/java/migration.sh +++ b/wrappers/java/migration.sh @@ -310,8 +310,6 @@ eval "$SED_START 's/mLc.setCpuCount(/\/\/mLc.setCpuCount(/g' $SED_END" #AccountCreator.updatePassword => What to do ? # XmlRpcRequest and XmlRpcSession constructors -#Android specifics not wrapped automatically - # Manual changes required # Some callbacks no longer exist, their name will be "removed", remove them # Above sed commands will create erros in syntax you need to manually fix: