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