Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef _CONFIG_API_H_ |
michael@0 | 6 | #define _CONFIG_API_H_ |
michael@0 | 7 | |
michael@0 | 8 | #include "cc_types.h" |
michael@0 | 9 | |
michael@0 | 10 | |
michael@0 | 11 | /** |
michael@0 | 12 | * configFetchReq |
michael@0 | 13 | * |
michael@0 | 14 | * This function tells the config manager to fetch the CTL file |
michael@0 | 15 | * and then fetch the config from the CUCM. It is expected that |
michael@0 | 16 | * this will result in processing of |
michael@0 | 17 | * the config file after the config managers response is received. |
michael@0 | 18 | * |
michael@0 | 19 | * The response received for this request is asynchronous and |
michael@0 | 20 | * should be handled via event provided by config manager. |
michael@0 | 21 | * The CCAPI_Config_reponse api needs to be called for the |
michael@0 | 22 | * handling of the response to the fetch request |
michael@0 | 23 | * |
michael@0 | 24 | */ |
michael@0 | 25 | void configFetchReq(int device_handle); |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * configParserError |
michael@0 | 29 | * |
michael@0 | 30 | * Notify the config manager that the config file has an error |
michael@0 | 31 | * and a new config file needs to be downloaded. |
michael@0 | 32 | * |
michael@0 | 33 | * The error could be XML format error or minimum config not being |
michael@0 | 34 | * present in the config file. It is expected that |
michael@0 | 35 | * this will result in processing of |
michael@0 | 36 | * the config file after the config managers response is received. |
michael@0 | 37 | * |
michael@0 | 38 | */ |
michael@0 | 39 | void configParserError(void); |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * When called this function should register with CUCM without prior device file download. |
michael@0 | 43 | */ |
michael@0 | 44 | void CCAPI_Start_response(int device_handle, const char *device_name, const char *sipUser, const char *sipPassword, const char *sipDomain); |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * Inform application that pSipcc stack has receive a NOTIFY message of event |
michael@0 | 48 | * type "service-control" and action=apply-config. The arguments passed to this |
michael@0 | 49 | * function contains the parameter values received in the message. |
michael@0 | 50 | * |
michael@0 | 51 | * @param config_version [in] latest version stamp of phone configuration. |
michael@0 | 52 | * @param dial_plan_version [in] latest version stamp of the dial plan. |
michael@0 | 53 | * @param fcp_version [in] latest version stamp of feature policy control. |
michael@0 | 54 | * @param cucm_result [in] action taken by the cucm for the changes applied by the |
michael@0 | 55 | * user to the phone configuration. cucm result could be |
michael@0 | 56 | * @li "no_change" - the new phone configuration changes do not impact Unified CM, |
michael@0 | 57 | * @li "config_applied" - The Unified CM Administration applied the |
michael@0 | 58 | * configuration changes dynamically without requiring phone to re-register, |
michael@0 | 59 | * @li "reregister_needed" - The Unified CM Administration applied the |
michael@0 | 60 | * configuration changes and required the phone to re-register to make them |
michael@0 | 61 | * effective. |
michael@0 | 62 | * @param load_id [in] - firmware image name that phone should be running with |
michael@0 | 63 | * @param inactive_load_id [in] - firmware image name that phone should be in inactive partition. |
michael@0 | 64 | * @param load_server [in] - address of load server to download the firmware |
michael@0 | 65 | * image load_id. |
michael@0 | 66 | * @param log_server [in] - log server address where error report need to be |
michael@0 | 67 | * sent. Error report, for example, could be related to image download failure |
michael@0 | 68 | * or phone configuration file download failure. |
michael@0 | 69 | * @param ppid [in] whether peer to peer upgrade is available |
michael@0 | 70 | * @return void |
michael@0 | 71 | */ |
michael@0 | 72 | void configApplyConfigNotify(cc_string_t config_version, |
michael@0 | 73 | cc_string_t dial_plan_version, |
michael@0 | 74 | cc_string_t fcp_version, |
michael@0 | 75 | cc_string_t cucm_result, |
michael@0 | 76 | cc_string_t load_id, |
michael@0 | 77 | cc_string_t inactive_load_id, |
michael@0 | 78 | cc_string_t load_server, |
michael@0 | 79 | cc_string_t log_server, |
michael@0 | 80 | cc_boolean ppid); |
michael@0 | 81 | |
michael@0 | 82 | /** |
michael@0 | 83 | * dialPlanFetchReq |
michael@0 | 84 | * |
michael@0 | 85 | * This function tells the get file request service to fetch the latest dial |
michael@0 | 86 | * plan from the CUCM. |
michael@0 | 87 | * |
michael@0 | 88 | * @param device_handle [in] handle of the device, the response is for |
michael@0 | 89 | * @param dialPlanFileName [in] the name of dialplan file to retrieve |
michael@0 | 90 | * @return cc_boolean indicating success/failure |
michael@0 | 91 | * |
michael@0 | 92 | */ |
michael@0 | 93 | cc_boolean dialPlanFetchReq(int device_handle, char* dialPlanFileName); |
michael@0 | 94 | |
michael@0 | 95 | /** |
michael@0 | 96 | * fcpFetchReq |
michael@0 | 97 | * |
michael@0 | 98 | * This function tells the get file request service to fetch the latest fcp |
michael@0 | 99 | * file from the CUCM. |
michael@0 | 100 | * |
michael@0 | 101 | * @param device_handle [in] handle of the device, the response is for |
michael@0 | 102 | * @param dialPlanFileName [in] the name of fcp file to retrieve |
michael@0 | 103 | * @return cc_boolean indicating success/failure |
michael@0 | 104 | * |
michael@0 | 105 | */ |
michael@0 | 106 | cc_boolean fcpFetchReq(int device_handle, char* fcpFileName); |
michael@0 | 107 | |
michael@0 | 108 | |
michael@0 | 109 | cc_boolean CCAPI_Config_set_server_address(const char *ip_address); |
michael@0 | 110 | cc_boolean CCAPI_Config_set_transport_udp(const cc_boolean is_udp); |
michael@0 | 111 | cc_boolean CCAPI_Config_set_local_voip_port(const int port); |
michael@0 | 112 | cc_boolean CCAPI_Config_set_remote_voip_port(const int port); |
michael@0 | 113 | int CCAPI_Config_get_local_voip_port(); |
michael@0 | 114 | int CCAPI_Config_get_remote_voip_port(); |
michael@0 | 115 | const char* CCAPI_Config_get_version(); |
michael@0 | 116 | cc_boolean CCAPI_Config_set_p2p_mode(const cc_boolean is_p2p); |
michael@0 | 117 | cc_boolean CCAPI_Config_set_sdp_mode(const cc_boolean is_sdp); |
michael@0 | 118 | cc_boolean CCAPI_Config_set_avp_mode(const cc_boolean is_rtpsavpf); |
michael@0 | 119 | |
michael@0 | 120 | #endif /* _CONFIG_API_H_ */ |