1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/signaling/src/sipcc/include/config_api.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,120 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef _CONFIG_API_H_ 1.9 +#define _CONFIG_API_H_ 1.10 + 1.11 +#include "cc_types.h" 1.12 + 1.13 + 1.14 +/** 1.15 + * configFetchReq 1.16 + * 1.17 + * This function tells the config manager to fetch the CTL file 1.18 + * and then fetch the config from the CUCM. It is expected that 1.19 + * this will result in processing of 1.20 + * the config file after the config managers response is received. 1.21 + * 1.22 + * The response received for this request is asynchronous and 1.23 + * should be handled via event provided by config manager. 1.24 + * The CCAPI_Config_reponse api needs to be called for the 1.25 + * handling of the response to the fetch request 1.26 + * 1.27 + */ 1.28 +void configFetchReq(int device_handle); 1.29 + 1.30 +/** 1.31 + * configParserError 1.32 + * 1.33 + * Notify the config manager that the config file has an error 1.34 + * and a new config file needs to be downloaded. 1.35 + * 1.36 + * The error could be XML format error or minimum config not being 1.37 + * present in the config file. It is expected that 1.38 + * this will result in processing of 1.39 + * the config file after the config managers response is received. 1.40 + * 1.41 + */ 1.42 +void configParserError(void); 1.43 + 1.44 +/** 1.45 + * When called this function should register with CUCM without prior device file download. 1.46 + */ 1.47 +void CCAPI_Start_response(int device_handle, const char *device_name, const char *sipUser, const char *sipPassword, const char *sipDomain); 1.48 + 1.49 +/** 1.50 + * Inform application that pSipcc stack has receive a NOTIFY message of event 1.51 + * type "service-control" and action=apply-config. The arguments passed to this 1.52 + * function contains the parameter values received in the message. 1.53 + * 1.54 + * @param config_version [in] latest version stamp of phone configuration. 1.55 + * @param dial_plan_version [in] latest version stamp of the dial plan. 1.56 + * @param fcp_version [in] latest version stamp of feature policy control. 1.57 + * @param cucm_result [in] action taken by the cucm for the changes applied by the 1.58 + * user to the phone configuration. cucm result could be 1.59 + * @li "no_change" - the new phone configuration changes do not impact Unified CM, 1.60 + * @li "config_applied" - The Unified CM Administration applied the 1.61 + * configuration changes dynamically without requiring phone to re-register, 1.62 + * @li "reregister_needed" - The Unified CM Administration applied the 1.63 + * configuration changes and required the phone to re-register to make them 1.64 + * effective. 1.65 + * @param load_id [in] - firmware image name that phone should be running with 1.66 + * @param inactive_load_id [in] - firmware image name that phone should be in inactive partition. 1.67 + * @param load_server [in] - address of load server to download the firmware 1.68 + * image load_id. 1.69 + * @param log_server [in] - log server address where error report need to be 1.70 + * sent. Error report, for example, could be related to image download failure 1.71 + * or phone configuration file download failure. 1.72 + * @param ppid [in] whether peer to peer upgrade is available 1.73 + * @return void 1.74 + */ 1.75 +void configApplyConfigNotify(cc_string_t config_version, 1.76 + cc_string_t dial_plan_version, 1.77 + cc_string_t fcp_version, 1.78 + cc_string_t cucm_result, 1.79 + cc_string_t load_id, 1.80 + cc_string_t inactive_load_id, 1.81 + cc_string_t load_server, 1.82 + cc_string_t log_server, 1.83 + cc_boolean ppid); 1.84 + 1.85 +/** 1.86 + * dialPlanFetchReq 1.87 + * 1.88 + * This function tells the get file request service to fetch the latest dial 1.89 + * plan from the CUCM. 1.90 + * 1.91 + * @param device_handle [in] handle of the device, the response is for 1.92 + * @param dialPlanFileName [in] the name of dialplan file to retrieve 1.93 + * @return cc_boolean indicating success/failure 1.94 + * 1.95 + */ 1.96 +cc_boolean dialPlanFetchReq(int device_handle, char* dialPlanFileName); 1.97 + 1.98 +/** 1.99 + * fcpFetchReq 1.100 + * 1.101 + * This function tells the get file request service to fetch the latest fcp 1.102 + * file from the CUCM. 1.103 + * 1.104 + * @param device_handle [in] handle of the device, the response is for 1.105 + * @param dialPlanFileName [in] the name of fcp file to retrieve 1.106 +* @return cc_boolean indicating success/failure 1.107 + * 1.108 + */ 1.109 +cc_boolean fcpFetchReq(int device_handle, char* fcpFileName); 1.110 + 1.111 + 1.112 +cc_boolean CCAPI_Config_set_server_address(const char *ip_address); 1.113 +cc_boolean CCAPI_Config_set_transport_udp(const cc_boolean is_udp); 1.114 +cc_boolean CCAPI_Config_set_local_voip_port(const int port); 1.115 +cc_boolean CCAPI_Config_set_remote_voip_port(const int port); 1.116 +int CCAPI_Config_get_local_voip_port(); 1.117 +int CCAPI_Config_get_remote_voip_port(); 1.118 +const char* CCAPI_Config_get_version(); 1.119 +cc_boolean CCAPI_Config_set_p2p_mode(const cc_boolean is_p2p); 1.120 +cc_boolean CCAPI_Config_set_sdp_mode(const cc_boolean is_sdp); 1.121 +cc_boolean CCAPI_Config_set_avp_mode(const cc_boolean is_rtpsavpf); 1.122 + 1.123 +#endif /* _CONFIG_API_H_ */