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 _CCAPI_DEVICE_INFO_H_ |
michael@0 | 6 | #define _CCAPI_DEVICE_INFO_H_ |
michael@0 | 7 | |
michael@0 | 8 | #include "ccapi_types.h" |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * gets the device name |
michael@0 | 12 | * @returns - a pointer to the device name |
michael@0 | 13 | */ |
michael@0 | 14 | cc_deviceinfo_ref_t CCAPI_DeviceInfo_getDeviceHandle() ; |
michael@0 | 15 | |
michael@0 | 16 | /** |
michael@0 | 17 | * gets the device name |
michael@0 | 18 | * @param [in] handle - reference to device info |
michael@0 | 19 | * @returns - a pointer to the device name |
michael@0 | 20 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 21 | */ |
michael@0 | 22 | cc_string_t CCAPI_DeviceInfo_getDeviceName(cc_deviceinfo_ref_t handle) ; |
michael@0 | 23 | |
michael@0 | 24 | /** |
michael@0 | 25 | * gets the device idle status |
michael@0 | 26 | * @param [in] handle - reference to device info |
michael@0 | 27 | * @returns boolean - idle status |
michael@0 | 28 | */ |
michael@0 | 29 | cc_boolean CCAPI_DeviceInfo_isPhoneIdle(cc_deviceinfo_ref_t handle) ; |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * gets the service state |
michael@0 | 33 | * @param [in] handle - reference to device info |
michael@0 | 34 | * @returns cc_service_state_t - INS/OOS |
michael@0 | 35 | */ |
michael@0 | 36 | cc_service_state_t CCAPI_DeviceInfo_getServiceState(cc_deviceinfo_ref_t handle) ; |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * gets the service cause |
michael@0 | 40 | * @param [in] handle - reference to device info |
michael@0 | 41 | * @returns cc_service_cause_t - reason for service state |
michael@0 | 42 | */ |
michael@0 | 43 | cc_service_cause_t CCAPI_DeviceInfo_getServiceCause(cc_deviceinfo_ref_t handle) ; |
michael@0 | 44 | |
michael@0 | 45 | /** |
michael@0 | 46 | * gets the cucm mode |
michael@0 | 47 | * @param [in] handle - reference to device info |
michael@0 | 48 | * @returns cc_cucm_mode_t - CUCM mode |
michael@0 | 49 | */ |
michael@0 | 50 | cc_cucm_mode_t CCAPI_DeviceInfo_getCUCMMode(cc_deviceinfo_ref_t handle) ; |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * gets list of handles to calls on the device |
michael@0 | 54 | * @param [in] handle - reference to device info |
michael@0 | 55 | * @param [out] handles - array of call handle to be returned |
michael@0 | 56 | * @param [in,out] count number allocated in array/elements returned |
michael@0 | 57 | * @returns |
michael@0 | 58 | */ |
michael@0 | 59 | void CCAPI_DeviceInfo_getCalls(cc_deviceinfo_ref_t handle, cc_call_handle_t handles[], cc_uint16_t *count) ; |
michael@0 | 60 | |
michael@0 | 61 | /** |
michael@0 | 62 | * gets list of handles to calls on the device by state |
michael@0 | 63 | * @param [in] handle - reference to device info |
michael@0 | 64 | * @param [in] state - call state for which the calls are requested |
michael@0 | 65 | * @param [out] handles - array of call handle to be returned |
michael@0 | 66 | * @param [in,out] count number allocated in array/elements returned |
michael@0 | 67 | * @returns |
michael@0 | 68 | */ |
michael@0 | 69 | void CCAPI_DeviceInfo_getCallsByState(cc_deviceinfo_ref_t handle, cc_call_state_t state, |
michael@0 | 70 | cc_call_handle_t handles[], cc_uint16_t *count) ; |
michael@0 | 71 | |
michael@0 | 72 | /** |
michael@0 | 73 | * gets list of handles to lines on the device |
michael@0 | 74 | * @param [in] handle - reference to device info |
michael@0 | 75 | * @param [in] handles - array of line handle to be returned |
michael@0 | 76 | * @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated |
michael@0 | 77 | * @returns |
michael@0 | 78 | */ |
michael@0 | 79 | void CCAPI_DeviceInfo_getLines(cc_deviceinfo_ref_t handle, cc_lineid_t handles[], cc_uint16_t *count) ; |
michael@0 | 80 | |
michael@0 | 81 | /** |
michael@0 | 82 | * gets list of handles to features on the device |
michael@0 | 83 | * @param [in] handle - reference to device info |
michael@0 | 84 | * @param [in] handles - array of feature handle to be returned |
michael@0 | 85 | * @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated |
michael@0 | 86 | * @returns |
michael@0 | 87 | */ |
michael@0 | 88 | void CCAPI_DeviceInfo_getFeatures(cc_deviceinfo_ref_t handle, cc_featureinfo_ref_t handles[], cc_uint16_t *count) ; |
michael@0 | 89 | |
michael@0 | 90 | /** |
michael@0 | 91 | * gets handles of call agent servers |
michael@0 | 92 | * @param [in] handle - reference to device info |
michael@0 | 93 | * @param [in] handles - array of handles to call agent servers |
michael@0 | 94 | * @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated |
michael@0 | 95 | * @returns |
michael@0 | 96 | */ |
michael@0 | 97 | void CCAPI_DeviceInfo_getCallServers(cc_deviceinfo_ref_t handle, cc_callserver_ref_t handles[], cc_uint16_t *count) ; |
michael@0 | 98 | |
michael@0 | 99 | /** |
michael@0 | 100 | * gets call server name |
michael@0 | 101 | * @param [in] handle - handle of call server |
michael@0 | 102 | * @returns name of the call server |
michael@0 | 103 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 104 | */ |
michael@0 | 105 | cc_string_t CCAPI_DeviceInfo_getCallServerName(cc_callserver_ref_t handle); |
michael@0 | 106 | |
michael@0 | 107 | /** |
michael@0 | 108 | * gets call server mode |
michael@0 | 109 | * @param [in] handle - handle of call server |
michael@0 | 110 | * @returns - mode of the call server |
michael@0 | 111 | */ |
michael@0 | 112 | cc_cucm_mode_t CCAPI_DeviceInfo_getCallServerMode(cc_callserver_ref_t handle); |
michael@0 | 113 | |
michael@0 | 114 | /** |
michael@0 | 115 | * gets calls erver name |
michael@0 | 116 | * @param [in] handle - handle of call server |
michael@0 | 117 | * @returns status of the call server |
michael@0 | 118 | */ |
michael@0 | 119 | cc_ccm_status_t CCAPI_DeviceInfo_getCallServerStatus(cc_callserver_ref_t handle); |
michael@0 | 120 | |
michael@0 | 121 | /** |
michael@0 | 122 | * get the NOTIFICATION PROMPT |
michael@0 | 123 | * @param [in] handle - reference to device info |
michael@0 | 124 | * @returns |
michael@0 | 125 | */ |
michael@0 | 126 | cc_string_t CCAPI_DeviceInfo_getNotifyPrompt(cc_deviceinfo_ref_t handle) ; |
michael@0 | 127 | |
michael@0 | 128 | /** |
michael@0 | 129 | * get the NOTIFICATION PROMPT PRIORITY |
michael@0 | 130 | * @param [in] handle - reference to device info |
michael@0 | 131 | * @returns |
michael@0 | 132 | */ |
michael@0 | 133 | cc_uint32_t CCAPI_DeviceInfo_getNotifyPromptPriority(cc_deviceinfo_ref_t handle) ; |
michael@0 | 134 | |
michael@0 | 135 | /** |
michael@0 | 136 | * get the NOTIFICATION PROMPT Progress |
michael@0 | 137 | * @param [in] handle - reference to device info |
michael@0 | 138 | * @returns |
michael@0 | 139 | */ |
michael@0 | 140 | cc_uint32_t CCAPI_DeviceInfo_getNotifyPromptProgress(cc_deviceinfo_ref_t handle) ; |
michael@0 | 141 | |
michael@0 | 142 | /** |
michael@0 | 143 | * gets provisioing for missed call logging |
michael@0 | 144 | * This value should be reread on CONFIG_UPDATE event |
michael@0 | 145 | * @param [in] handle - reference to device info |
michael@0 | 146 | * @returns boolean - false => disabled true => enabled |
michael@0 | 147 | */ |
michael@0 | 148 | cc_boolean CCAPI_DeviceInfo_isMissedCallLoggingEnabled (cc_deviceinfo_ref_t handle); |
michael@0 | 149 | |
michael@0 | 150 | /** |
michael@0 | 151 | * gets provisioing for placed call logging |
michael@0 | 152 | * This value should be reread on CONFIG_UPDATE event |
michael@0 | 153 | * @param [in] handle - reference to device info |
michael@0 | 154 | * @returns boolean - false => disabled true => enabled |
michael@0 | 155 | */ |
michael@0 | 156 | cc_boolean CCAPI_DeviceInfo_isPlacedCallLoggingEnabled (cc_deviceinfo_ref_t handle); |
michael@0 | 157 | |
michael@0 | 158 | /** |
michael@0 | 159 | * gets provisioing for received call logging |
michael@0 | 160 | * This value should be reread on CONFIG_UPDATE event |
michael@0 | 161 | * @param [in] handle - reference to device info |
michael@0 | 162 | * @returns boolean - false => disabled true => enabled |
michael@0 | 163 | */ |
michael@0 | 164 | cc_boolean CCAPI_DeviceInfo_isReceivedCallLoggingEnabled (cc_deviceinfo_ref_t handle); |
michael@0 | 165 | |
michael@0 | 166 | /** |
michael@0 | 167 | * gets register/in service time |
michael@0 | 168 | * This value should be read once the register completes successfully |
michael@0 | 169 | * @param [in] handle - reference to device info |
michael@0 | 170 | * @returns long - time registration completed successfully. |
michael@0 | 171 | */ |
michael@0 | 172 | long long CCAPI_DeviceInfo_getRegTime (cc_deviceinfo_ref_t handle); |
michael@0 | 173 | |
michael@0 | 174 | /** |
michael@0 | 175 | * Returns dot notation IP address used for registering phone. If phone is not |
michael@0 | 176 | * registered, then "0.0.0.0" is returned. |
michael@0 | 177 | * @param [in] handle - reference to device info |
michael@0 | 178 | * @return cc_string_t IP address used to register phone. |
michael@0 | 179 | */ |
michael@0 | 180 | cc_string_t CCAPI_DeviceInfo_getSignalingIPAddress(cc_deviceinfo_ref_t handle); |
michael@0 | 181 | |
michael@0 | 182 | /** |
michael@0 | 183 | * Returns camera admin enable/disable status |
michael@0 | 184 | * @param [in] handle - reference to device info |
michael@0 | 185 | * @return cc_boolean - TRUE => enabled |
michael@0 | 186 | */ |
michael@0 | 187 | cc_boolean CCAPI_DeviceInfo_isCameraEnabled(cc_deviceinfo_ref_t handle); |
michael@0 | 188 | |
michael@0 | 189 | /** |
michael@0 | 190 | * Returns admin enable/disable video capablity for device |
michael@0 | 191 | * @param [in] handle - reference to device info |
michael@0 | 192 | * @return cc_boolean - TRUE => enabled |
michael@0 | 193 | */ |
michael@0 | 194 | cc_boolean CCAPI_DeviceInfo_isVideoCapEnabled(cc_deviceinfo_ref_t handle); |
michael@0 | 195 | |
michael@0 | 196 | /** |
michael@0 | 197 | * gets the device mwi_lamp state |
michael@0 | 198 | * @param [in] handle - reference to device info |
michael@0 | 199 | * @returns boolean - mwi_lamp state |
michael@0 | 200 | */ |
michael@0 | 201 | cc_boolean CCAPI_DeviceInfo_getMWILampState(cc_deviceinfo_ref_t handle); |
michael@0 | 202 | |
michael@0 | 203 | #endif /* _CCAPIAPI_DEVICE_INFO_H_ */ |