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_CALL_INFO_H_ |
michael@0 | 6 | #define _CCAPI_CALL_INFO_H_ |
michael@0 | 7 | |
michael@0 | 8 | #if defined(__cplusplus) && __cplusplus >= 201103L |
michael@0 | 9 | typedef struct Timecard Timecard; |
michael@0 | 10 | #else |
michael@0 | 11 | #include "timecard.h" |
michael@0 | 12 | #endif |
michael@0 | 13 | |
michael@0 | 14 | #include "ccapi_types.h" |
michael@0 | 15 | #include "peer_connection_types.h" |
michael@0 | 16 | #include "fsmdef_states.h" |
michael@0 | 17 | |
michael@0 | 18 | /** |
michael@0 | 19 | * get Line on which this call is |
michael@0 | 20 | * @param [in] handle - call info handle |
michael@0 | 21 | * @return cc_line_id_t - line ID |
michael@0 | 22 | */ |
michael@0 | 23 | cc_lineid_t CCAPI_CallInfo_getLine(cc_callinfo_ref_t handle); |
michael@0 | 24 | |
michael@0 | 25 | /** |
michael@0 | 26 | * get Call state |
michael@0 | 27 | * @param [in] handle - call info handle |
michael@0 | 28 | * @return call state |
michael@0 | 29 | */ |
michael@0 | 30 | cc_call_state_t CCAPI_CallInfo_getCallState(cc_callinfo_ref_t handle); |
michael@0 | 31 | |
michael@0 | 32 | /** |
michael@0 | 33 | * get FSM state |
michael@0 | 34 | * @param [in] handle - call info handle |
michael@0 | 35 | * @return fsm state |
michael@0 | 36 | */ |
michael@0 | 37 | fsmdef_states_t CCAPI_CallInfo_getFsmState(cc_callinfo_ref_t handle); |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * get call attributes |
michael@0 | 41 | * @param [in] handle - call info handle |
michael@0 | 42 | * @return call attributes |
michael@0 | 43 | */ |
michael@0 | 44 | cc_call_attr_t CCAPI_CallInfo_getCallAttr(cc_callinfo_ref_t handle); |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * get Call Type |
michael@0 | 48 | * @param [in] handle - call info handle |
michael@0 | 49 | * @return call type |
michael@0 | 50 | */ |
michael@0 | 51 | cc_call_type_t CCAPI_CallInfo_getCallType(cc_callinfo_ref_t handle); |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * get Called party name |
michael@0 | 55 | * @param [in] handle - call info handle |
michael@0 | 56 | * @return called party name |
michael@0 | 57 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 58 | */ |
michael@0 | 59 | cc_string_t CCAPI_CallInfo_getCalledPartyName(cc_callinfo_ref_t handle); |
michael@0 | 60 | |
michael@0 | 61 | /** |
michael@0 | 62 | * get Called party number |
michael@0 | 63 | * @param [in] handle - call info handle |
michael@0 | 64 | * @return called party number |
michael@0 | 65 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 66 | */ |
michael@0 | 67 | cc_string_t CCAPI_CallInfo_getCalledPartyNumber(cc_callinfo_ref_t handle); |
michael@0 | 68 | |
michael@0 | 69 | /** |
michael@0 | 70 | * get Calling party name |
michael@0 | 71 | * @param [in] handle - call info handle |
michael@0 | 72 | * @return calling party name |
michael@0 | 73 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 74 | */ |
michael@0 | 75 | cc_string_t CCAPI_CallInfo_getCallingPartyName(cc_callinfo_ref_t handle); |
michael@0 | 76 | |
michael@0 | 77 | /** |
michael@0 | 78 | * get Calling party number |
michael@0 | 79 | * @param [in] handle - call info handle |
michael@0 | 80 | * @return calling party number |
michael@0 | 81 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 82 | */ |
michael@0 | 83 | cc_string_t CCAPI_CallInfo_getCallingPartyNumber(cc_callinfo_ref_t handle); |
michael@0 | 84 | |
michael@0 | 85 | /** |
michael@0 | 86 | * get Calling party number |
michael@0 | 87 | * @param [in] handle - call info handle |
michael@0 | 88 | * @return calling party number |
michael@0 | 89 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 90 | */ |
michael@0 | 91 | cc_string_t CCAPI_CallInfo_getAlternateNumber(cc_callinfo_ref_t handle); |
michael@0 | 92 | |
michael@0 | 93 | /** |
michael@0 | 94 | * get Original Called party name |
michael@0 | 95 | * @param [in] handle - call info handle |
michael@0 | 96 | * @return original called party name |
michael@0 | 97 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 98 | */ |
michael@0 | 99 | cc_string_t CCAPI_CallInfo_getOriginalCalledPartyName(cc_callinfo_ref_t handle); |
michael@0 | 100 | |
michael@0 | 101 | /** |
michael@0 | 102 | * get Original Called party number |
michael@0 | 103 | * @param [in] handle - call info handle |
michael@0 | 104 | * @return original called party number |
michael@0 | 105 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 106 | */ |
michael@0 | 107 | cc_string_t CCAPI_CallInfo_getOriginalCalledPartyNumber(cc_callinfo_ref_t handle); |
michael@0 | 108 | |
michael@0 | 109 | /** |
michael@0 | 110 | * get last redirecting party name |
michael@0 | 111 | * @param [in] handle - call info handle |
michael@0 | 112 | * @return last redirecting party name |
michael@0 | 113 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 114 | */ |
michael@0 | 115 | cc_string_t CCAPI_CallInfo_getLastRedirectingPartyName(cc_callinfo_ref_t handle); |
michael@0 | 116 | |
michael@0 | 117 | /** |
michael@0 | 118 | * get past redirecting party number |
michael@0 | 119 | * @param [in] handle - call info handle |
michael@0 | 120 | * @return last redirecting party number |
michael@0 | 121 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 122 | */ |
michael@0 | 123 | cc_string_t CCAPI_CallInfo_getLastRedirectingPartyNumber(cc_callinfo_ref_t handle); |
michael@0 | 124 | |
michael@0 | 125 | /** |
michael@0 | 126 | * get placed call party name |
michael@0 | 127 | * @param [in] handle - call info handle |
michael@0 | 128 | * @return placed party name |
michael@0 | 129 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 130 | */ |
michael@0 | 131 | cc_string_t CCAPI_CallInfo_getPlacedCallPartyName(cc_callinfo_ref_t handle); |
michael@0 | 132 | |
michael@0 | 133 | /** |
michael@0 | 134 | * get placed call party number |
michael@0 | 135 | * @param [in] handle - call info handle |
michael@0 | 136 | * @return placed party number |
michael@0 | 137 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 138 | */ |
michael@0 | 139 | cc_string_t CCAPI_CallInfo_getPlacedCallPartyNumber(cc_callinfo_ref_t handle); |
michael@0 | 140 | |
michael@0 | 141 | |
michael@0 | 142 | /** |
michael@0 | 143 | * get call instance number |
michael@0 | 144 | * @param [in] handle - call info handle |
michael@0 | 145 | * @return |
michael@0 | 146 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 147 | */ |
michael@0 | 148 | cc_int32_t CCAPI_CallInfo_getCallInstance(cc_callinfo_ref_t handle); |
michael@0 | 149 | |
michael@0 | 150 | /** |
michael@0 | 151 | * get call status prompt |
michael@0 | 152 | * @param [in] handle - call info handle |
michael@0 | 153 | * @return call status |
michael@0 | 154 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 155 | */ |
michael@0 | 156 | cc_string_t CCAPI_CallInfo_getStatus(cc_callinfo_ref_t handle); |
michael@0 | 157 | |
michael@0 | 158 | /** |
michael@0 | 159 | * get call security // TODO XLS has callagent security and endtoend security on call? |
michael@0 | 160 | * @param [in] handle - call info handle |
michael@0 | 161 | * @return call security status |
michael@0 | 162 | */ |
michael@0 | 163 | cc_call_security_t CCAPI_CallInfo_getSecurity(cc_callinfo_ref_t handle); |
michael@0 | 164 | |
michael@0 | 165 | /** |
michael@0 | 166 | * get Call Selection Status |
michael@0 | 167 | * @param [in] handle - call info handle |
michael@0 | 168 | * @return cc_boolean - TRUE => selected |
michael@0 | 169 | */ |
michael@0 | 170 | cc_int32_t CCAPI_CallInfo_getSelectionStatus(cc_callinfo_ref_t handle); |
michael@0 | 171 | |
michael@0 | 172 | /** |
michael@0 | 173 | * get GCID |
michael@0 | 174 | * @param [in] handle - call info handle |
michael@0 | 175 | * @return GCID |
michael@0 | 176 | * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed |
michael@0 | 177 | */ |
michael@0 | 178 | cc_string_t CCAPI_CallInfo_getGCID(cc_callinfo_ref_t handle); |
michael@0 | 179 | |
michael@0 | 180 | /** |
michael@0 | 181 | * get ringer loop count |
michael@0 | 182 | * @param handle - call handle |
michael@0 | 183 | * @return once Vs continuous |
michael@0 | 184 | */ |
michael@0 | 185 | cc_boolean CCAPI_CallInfo_getIsRingOnce(cc_callinfo_ref_t handle); |
michael@0 | 186 | |
michael@0 | 187 | /** |
michael@0 | 188 | * get ringer state. |
michael@0 | 189 | * @param handle - call handle |
michael@0 | 190 | * @return ringer state. |
michael@0 | 191 | */ |
michael@0 | 192 | cc_boolean CCAPI_CallInfo_getRingerState(cc_callinfo_ref_t handle); |
michael@0 | 193 | |
michael@0 | 194 | /** |
michael@0 | 195 | * get ringer mode |
michael@0 | 196 | * @param handle - call handle |
michael@0 | 197 | * @return ringer mode |
michael@0 | 198 | */ |
michael@0 | 199 | int CCAPI_CallInfo_getRingerMode(cc_callinfo_ref_t handle); |
michael@0 | 200 | |
michael@0 | 201 | |
michael@0 | 202 | /** |
michael@0 | 203 | * get onhook reason |
michael@0 | 204 | * @param [in] handle - call info handle |
michael@0 | 205 | * @return onhook reason |
michael@0 | 206 | */ |
michael@0 | 207 | cc_int32_t CCAPI_CallInfo_getOnhookReason(cc_callinfo_ref_t handle); |
michael@0 | 208 | |
michael@0 | 209 | /** |
michael@0 | 210 | * is Conference Call? |
michael@0 | 211 | * @param [in] handle - call info handle |
michael@0 | 212 | * @return boolean - is Conference |
michael@0 | 213 | */ |
michael@0 | 214 | cc_boolean CCAPI_CallInfo_getIsConference(cc_callinfo_ref_t handle); |
michael@0 | 215 | |
michael@0 | 216 | /** |
michael@0 | 217 | * getStream Statistics |
michael@0 | 218 | * @param [in] handle - call info handle |
michael@0 | 219 | * @param [in,out] stats - Array to get the stats |
michael@0 | 220 | * @param [in,out] count - in len of stats arraysize of stats / out stats copied |
michael@0 | 221 | * @return cc_return_t - CC_SUCCESS or CC_FAILURE |
michael@0 | 222 | */ |
michael@0 | 223 | cc_return_t CCAPI_CallInfo_getStreamStatistics(cc_callinfo_ref_t handle, cc_int32_t stats[], cc_int32_t *count); |
michael@0 | 224 | |
michael@0 | 225 | |
michael@0 | 226 | /** |
michael@0 | 227 | * has capability - is the feature allowed |
michael@0 | 228 | * @param [in] handle - call info handle |
michael@0 | 229 | * @param [in] feat_id - feature id |
michael@0 | 230 | * @return boolean - is Allowed |
michael@0 | 231 | */ |
michael@0 | 232 | cc_boolean CCAPI_CallInfo_hasCapability(cc_callinfo_ref_t handle, cc_int32_t feat_id); |
michael@0 | 233 | |
michael@0 | 234 | /** |
michael@0 | 235 | * get Allowed Feature set |
michael@0 | 236 | * @param [in] handle - call info handle |
michael@0 | 237 | * @param [in,out] feat_set - array of len CC_CALL_CAP_MAX |
michael@0 | 238 | * @return cc_return_t - CC_SUCCESS or CC_FAILURE |
michael@0 | 239 | */ |
michael@0 | 240 | cc_return_t CCAPI_CallInfo_getCapabilitySet(cc_callinfo_ref_t handle, cc_int32_t feat_set[]); |
michael@0 | 241 | |
michael@0 | 242 | /** |
michael@0 | 243 | * Call selection status |
michael@0 | 244 | * @param [in] handle - call info handle |
michael@0 | 245 | * @return cc_boolean - selection status |
michael@0 | 246 | */ |
michael@0 | 247 | cc_boolean CCAPI_CallInfo_isCallSelected(cc_callinfo_ref_t handle); |
michael@0 | 248 | |
michael@0 | 249 | /** |
michael@0 | 250 | * INFO Package for RECEIVED_INFO event |
michael@0 | 251 | * @param [in] handle - call info handle |
michael@0 | 252 | * @return cc_string_t - Info package header |
michael@0 | 253 | */ |
michael@0 | 254 | cc_string_t CCAPI_CallInfo_getINFOPack(cc_callinfo_ref_t handle); |
michael@0 | 255 | |
michael@0 | 256 | /** |
michael@0 | 257 | * INFO type for RECEIVED_INFO event |
michael@0 | 258 | * @param [in] handle - call info handle |
michael@0 | 259 | * @return cc_string_t - content-type header |
michael@0 | 260 | */ |
michael@0 | 261 | cc_string_t CCAPI_CallInfo_getINFOType(cc_callinfo_ref_t handle); |
michael@0 | 262 | |
michael@0 | 263 | /** |
michael@0 | 264 | * INFO body for RECEIVED_INFO event |
michael@0 | 265 | * @param [in] handle - call info handle |
michael@0 | 266 | * @return cc_string_t - INFO body |
michael@0 | 267 | */ |
michael@0 | 268 | cc_string_t CCAPI_CallInfo_getINFOBody(cc_callinfo_ref_t handle); |
michael@0 | 269 | |
michael@0 | 270 | /** |
michael@0 | 271 | * Get the call log reference |
michael@0 | 272 | * @param [in] handle - call info handle |
michael@0 | 273 | * @return cc_string_t - INFO body |
michael@0 | 274 | * NOTE: Memory associated with the call log is tied to the cc_callinfo_ref_t handle |
michael@0 | 275 | * this would be freed when the callinfo ref is freed. |
michael@0 | 276 | */ |
michael@0 | 277 | cc_calllog_ref_t CCAPI_CallInfo_getCallLogRef(cc_callinfo_ref_t handle); |
michael@0 | 278 | |
michael@0 | 279 | /** |
michael@0 | 280 | * returns the negotiated video direction for this call |
michael@0 | 281 | * @param [in] handle - call handle |
michael@0 | 282 | * @return cc_sdp_direction_t - video direction |
michael@0 | 283 | */ |
michael@0 | 284 | cc_sdp_direction_t CCAPI_CallInfo_getVideoDirection(cc_callinfo_ref_t handle); |
michael@0 | 285 | |
michael@0 | 286 | /** |
michael@0 | 287 | * Returns the Audio mute state for this call |
michael@0 | 288 | * @return boolean true=muted false=not muted |
michael@0 | 289 | */ |
michael@0 | 290 | cc_boolean CCAPI_CallInfo_isAudioMuted(cc_callinfo_ref_t handle); |
michael@0 | 291 | |
michael@0 | 292 | /** |
michael@0 | 293 | * Returns the Video mute state for this call |
michael@0 | 294 | * @return boolean true=muted false=not muted |
michael@0 | 295 | */ |
michael@0 | 296 | cc_boolean CCAPI_CallInfo_isVideoMuted(cc_callinfo_ref_t handle); |
michael@0 | 297 | |
michael@0 | 298 | /** |
michael@0 | 299 | * get SDP string CreateOffer and CreateAnswer callback |
michael@0 | 300 | * @param [in] handle - call info handle |
michael@0 | 301 | * @return sdp |
michael@0 | 302 | */ |
michael@0 | 303 | cc_string_t CCAPI_CallInfo_getSDP(cc_callinfo_ref_t handle); |
michael@0 | 304 | |
michael@0 | 305 | /** |
michael@0 | 306 | * get trickle candidate |
michael@0 | 307 | * @param [in] handle - call info handle |
michael@0 | 308 | * @return sdp |
michael@0 | 309 | */ |
michael@0 | 310 | cc_string_t CCAPI_CallInfo_getCandidate(cc_callinfo_ref_t handle); |
michael@0 | 311 | |
michael@0 | 312 | /** |
michael@0 | 313 | * get status code from internal JSEP functions |
michael@0 | 314 | * @param [in] handle - call info handle |
michael@0 | 315 | * @return status code |
michael@0 | 316 | */ |
michael@0 | 317 | cc_int32_t CCAPI_CallInfo_getStatusCode(cc_callinfo_ref_t handle); |
michael@0 | 318 | |
michael@0 | 319 | /** |
michael@0 | 320 | * get media stream table |
michael@0 | 321 | * @param [in] handle - call info handle |
michael@0 | 322 | * @return media track table |
michael@0 | 323 | */ |
michael@0 | 324 | MediaStreamTable* CCAPI_CallInfo_getMediaStreams(cc_callinfo_ref_t handle); |
michael@0 | 325 | |
michael@0 | 326 | /** |
michael@0 | 327 | * Take posession of timecard |
michael@0 | 328 | * @param [in] handle - call info handle |
michael@0 | 329 | * @return timecard pointer |
michael@0 | 330 | */ |
michael@0 | 331 | Timecard* CCAPI_CallInfo_takeTimecard(cc_callinfo_ref_t handle); |
michael@0 | 332 | |
michael@0 | 333 | #endif /* _CCAPIAPI_CALL_INFO_H_ */ |