Commit 06032c03 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added new constructors for XmlRpcRequest and XmlRpcSession

parent b43f5217
......@@ -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;
......
......@@ -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;
......
......@@ -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
}
......
......@@ -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);
/**
* @}
*/
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment