media/webrtc/signaling/src/sipcc/include/ccapi_call.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

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_H_
michael@0 6 #define _CCAPI_CALL_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
michael@0 16 /**
michael@0 17 * Get reference to call info
michael@0 18 * @param [in] handle - call handle
michael@0 19 * @return cc_call_info_snap_t
michael@0 20 * NOTE: The info returned by this method must be released using CCAPI_Call_releaseCallInfo()
michael@0 21 */
michael@0 22 cc_callinfo_ref_t CCAPI_Call_getCallInfo(cc_call_handle_t handle);
michael@0 23
michael@0 24 /**
michael@0 25 * Release the resources held by this call info snapshot
michael@0 26 * @param [in] ref - refrence to the call info to be freed
michael@0 27 * @return void
michael@0 28 */
michael@0 29 void CCAPI_Call_releaseCallInfo(cc_callinfo_ref_t ref);
michael@0 30
michael@0 31 /**
michael@0 32 * Retain the call info reference
michael@0 33 * @param [in] ref - reference to the call info to be retained
michael@0 34 * @return void
michael@0 35 * NOTE: Application that has retained callInfo must call CCAPI_Call_releaseCallInfo()
michael@0 36 * to free memory associated with this Info.
michael@0 37 */
michael@0 38 void CCAPI_Call_retainCallInfo(cc_callinfo_ref_t ref);
michael@0 39
michael@0 40 /**
michael@0 41 * get the line associated with this call
michael@0 42 * @param [in] handle - call handle
michael@0 43 * @return cc_lineid_t
michael@0 44 */
michael@0 45 cc_lineid_t CCAPI_Call_getLine(cc_call_handle_t call_handle);
michael@0 46
michael@0 47 /**
michael@0 48 * Originate call - API to go offhook and dial specified digits on a given call
michael@0 49 * @param [in] handle - call handle
michael@0 50 * @param [in] video_pref - video direction desired on call
michael@0 51 * @param [in] digits - digits to be dialed. can be empty then this API simply goes offhook
michael@0 52 * @return SUCCESS or FAILURE
michael@0 53 */
michael@0 54 cc_return_t CCAPI_Call_originateCall(cc_call_handle_t handle, cc_sdp_direction_t video_pref, cc_string_t digits);
michael@0 55
michael@0 56
michael@0 57 cc_return_t CCAPI_CreateOffer(cc_call_handle_t handle,
michael@0 58 cc_media_constraints_t *constraints,
michael@0 59 Timecard *tc);
michael@0 60
michael@0 61 cc_return_t CCAPI_CreateAnswer(cc_call_handle_t handle,
michael@0 62 cc_media_constraints_t *constraints,
michael@0 63 Timecard *tc);
michael@0 64
michael@0 65 cc_return_t CCAPI_SetLocalDescription(cc_call_handle_t handle,
michael@0 66 cc_jsep_action_t action,
michael@0 67 cc_string_t sdp,
michael@0 68 Timecard *tc);
michael@0 69
michael@0 70 cc_return_t CCAPI_SetRemoteDescription(cc_call_handle_t handle,
michael@0 71 cc_jsep_action_t action,
michael@0 72 cc_string_t sdp,
michael@0 73 Timecard *tc);
michael@0 74
michael@0 75 cc_return_t CCAPI_SetPeerConnection(cc_call_handle_t handle, cc_peerconnection_t pc);
michael@0 76
michael@0 77 cc_return_t CCAPI_AddStream(cc_call_handle_t handle,
michael@0 78 cc_media_stream_id_t stream_id,
michael@0 79 cc_media_track_id_t track_id,
michael@0 80 cc_media_type_t media_type,
michael@0 81 cc_media_constraints_t *constraints);
michael@0 82
michael@0 83 cc_return_t CCAPI_RemoveStream(cc_call_handle_t handle, cc_media_stream_id_t stream_id, cc_media_track_id_t track_id, cc_media_type_t media_type);
michael@0 84
michael@0 85 cc_return_t CCAPI_AddICECandidate(cc_call_handle_t handle,
michael@0 86 cc_string_t candidate,
michael@0 87 cc_string_t mid,
michael@0 88 cc_level_t level,
michael@0 89 Timecard *tc);
michael@0 90
michael@0 91 /**
michael@0 92 * Send digits on the call - can be invoked either to dial additional digits or send DTMF
michael@0 93 * @param [in] handle - call handle
michael@0 94 * @param [in] digit - digit to be dialed
michael@0 95 * @return SUCCESS or FAILURE
michael@0 96 */
michael@0 97 cc_return_t CCAPI_Call_sendDigit(cc_call_handle_t handle, cc_digit_t digit);
michael@0 98
michael@0 99 /**
michael@0 100 * Send Backspace - Delete last digit dialed.
michael@0 101 * @param [in] handle - call handle
michael@0 102 * @return SUCCESS or FAILURE
michael@0 103 */
michael@0 104 cc_return_t CCAPI_Call_backspace(cc_call_handle_t handle);
michael@0 105
michael@0 106 /**
michael@0 107 * Answer Call
michael@0 108 * @param [in] handle - call handle
michael@0 109 * @param [in] video_pref - video direction desired on call
michael@0 110 * @return SUCCESS or FAILURE
michael@0 111 */
michael@0 112 cc_return_t CCAPI_Call_answerCall(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
michael@0 113
michael@0 114 /**
michael@0 115 * Redial
michael@0 116 * @param [in] handle - call handle
michael@0 117 * @param [in] video_pref - video direction desired on call
michael@0 118 * @return SUCCESS or FAILURE
michael@0 119 */
michael@0 120 cc_return_t CCAPI_Call_redial(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
michael@0 121
michael@0 122 /**
michael@0 123 * Initiate Call Forward All
michael@0 124 * @param [in] handle - call handle
michael@0 125 * @return SUCCESS or FAILURE
michael@0 126 */
michael@0 127 cc_return_t CCAPI_Call_initiateCallForwardAll(cc_call_handle_t handle);
michael@0 128 /**
michael@0 129 * Hold
michael@0 130 * @param [in] handle - call handle
michael@0 131 * @param [in] reason - hold reason
michael@0 132 * @return SUCCESS or FAILURE
michael@0 133 */
michael@0 134 cc_return_t CCAPI_Call_hold(cc_call_handle_t handle, cc_hold_reason_t reason);
michael@0 135
michael@0 136 /**
michael@0 137 * Resume
michael@0 138 * @param [in] handle - call handle
michael@0 139 * @param [in] video_pref - video direction desired on call
michael@0 140 * @return SUCCESS or FAILURE
michael@0 141 */
michael@0 142 cc_return_t CCAPI_Call_resume(cc_call_handle_t handle, cc_sdp_direction_t video_pref) ;
michael@0 143
michael@0 144 /**
michael@0 145 * end Consult leg - used to end consult leg when the user picks active calls list for xfer/conf
michael@0 146 * @param [in] handle - call handle
michael@0 147 * @return SUCCESS or FAILURE
michael@0 148 */
michael@0 149 cc_return_t CCAPI_Call_endConsultativeCall(cc_call_handle_t handle);
michael@0 150
michael@0 151 /**
michael@0 152 * end Call
michael@0 153 * @param [in] handle - call handle
michael@0 154 * @return SUCCESS or FAILURE
michael@0 155 */
michael@0 156 cc_return_t CCAPI_Call_endCall(cc_call_handle_t handle);
michael@0 157
michael@0 158 /**
michael@0 159 * Initiate a conference
michael@0 160 * @param [in] handle - call handle
michael@0 161 * @param [in] video_pref - video direction desired on consult call
michael@0 162 * @return SUCCESS or FAILURE
michael@0 163 */
michael@0 164 cc_return_t CCAPI_Call_conferenceStart(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
michael@0 165
michael@0 166 /**
michael@0 167 * complete conference
michael@0 168 * @param [in] handle - call handle
michael@0 169 * @param [in] phandle - call handle of the other leg
michael@0 170 * @param [in] video_pref - video direction desired on consult call
michael@0 171 * @return SUCCESS or FAILURE
michael@0 172 */
michael@0 173 cc_return_t CCAPI_Call_conferenceComplete(cc_call_handle_t handle, cc_call_handle_t phandle,
michael@0 174 cc_sdp_direction_t video_pref);
michael@0 175
michael@0 176 /**
michael@0 177 * start transfer
michael@0 178 * @param [in] handle - call handle
michael@0 179 * @param [in] video_pref - video direction desired on consult call
michael@0 180 * @return SUCCESS or FAILURE
michael@0 181 */
michael@0 182 cc_return_t CCAPI_Call_transferStart(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
michael@0 183
michael@0 184 /**
michael@0 185 * complete transfer
michael@0 186 * @param [in] handle - call handle
michael@0 187 * @param [in] phandle - call handle of the other leg
michael@0 188 * @param [in] video_pref - video direction desired on consult call
michael@0 189 * @return SUCCESS or FAILURE
michael@0 190 */
michael@0 191 cc_return_t CCAPI_Call_transferComplete(cc_call_handle_t handle, cc_call_handle_t phandle,
michael@0 192 cc_sdp_direction_t video_pref);
michael@0 193
michael@0 194 /**
michael@0 195 * cancel conference or transfer
michael@0 196 * @param [in] handle - call handle
michael@0 197 * @return SUCCESS or FAILURE
michael@0 198 */
michael@0 199 cc_return_t CCAPI_Call_cancelTransferOrConferenceFeature(cc_call_handle_t handle);
michael@0 200
michael@0 201 /**
michael@0 202 * direct Transfer
michael@0 203 * @param [in] handle - call handle
michael@0 204 * @param [in] target - call handle for transfer target call
michael@0 205 * @return SUCCESS or FAILURE
michael@0 206 */
michael@0 207 cc_return_t CCAPI_Call_directTransfer(cc_call_handle_t handle, cc_call_handle_t target);
michael@0 208
michael@0 209 /**
michael@0 210 * Join Across line
michael@0 211 * @param [in] handle - call handle
michael@0 212 * @param [in] target - join target
michael@0 213 * @return SUCCESS or FAILURE
michael@0 214 */
michael@0 215 cc_return_t CCAPI_Call_joinAcrossLine(cc_call_handle_t handle, cc_call_handle_t target);
michael@0 216
michael@0 217 /**
michael@0 218 * BLF Call Pickup
michael@0 219 * @param [in] handle - call handle
michael@0 220 * @param [in] video_pref - video direction preference
michael@0 221 * @param [in] speed - speedDial Number
michael@0 222 * @return SUCCESS or FAILURE
michael@0 223 */
michael@0 224 cc_return_t CCAPI_Call_blfCallPickup(cc_call_handle_t handle, cc_sdp_direction_t video_pref, cc_string_t speed);
michael@0 225
michael@0 226 /**
michael@0 227 * Select a call
michael@0 228 * @param [in] handle - call handle
michael@0 229 * @return SUCCESS or FAILURE
michael@0 230 */
michael@0 231 cc_return_t CCAPI_Call_select(cc_call_handle_t handle);
michael@0 232
michael@0 233 /**
michael@0 234 * Update Video Media Cap for the call
michael@0 235 * @param [in] handle - call handle
michael@0 236 * @param [in] video_pref - video direction desired on call
michael@0 237 * @return SUCCESS or FAILURE
michael@0 238 */
michael@0 239 cc_return_t CCAPI_Call_updateVideoMediaCap(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
michael@0 240
michael@0 241 /**
michael@0 242 * send INFO method for the call
michael@0 243 * @param [in] handle - call handle
michael@0 244 * @param [in] infopackage - Info-Package header value
michael@0 245 * @param [in] infotype - Content-Type header val
michael@0 246 * @param [in] infobody - Body of the INFO message
michael@0 247 * @return SUCCESS or FAILURE
michael@0 248 */
michael@0 249 cc_return_t CCAPI_Call_sendInfo(cc_call_handle_t handle, cc_string_t infopackage, cc_string_t infotype, cc_string_t infobody);
michael@0 250
michael@0 251 /**
michael@0 252 * API to mute/unmute audio
michael@0 253 * @param [in] val - TRUE=> mute FALSE => unmute
michael@0 254 * @return SUCCESS or FAILURE
michael@0 255 * NOTE: The mute state is persisted within the stack and shall be remembered across hold/resume.
michael@0 256 * This API doesn't perform the mute operation but simply caches the mute state of the session.
michael@0 257 */
michael@0 258 cc_return_t CCAPI_Call_setAudioMute(cc_call_handle_t handle, cc_boolean val);
michael@0 259
michael@0 260 /**
michael@0 261 * API to mute/unmute Video
michael@0 262 * @param [in] val - TRUE=> mute FALSE => unmute
michael@0 263 * @return SUCCESS or FAILURE
michael@0 264 * NOTE: The mute state is persisted within the stack and shall be remembered across hold/resume
michael@0 265 * This API doesn't perform the mute operation but simply caches the mute state of the session.
michael@0 266 */
michael@0 267 cc_return_t CCAPI_Call_setVideoMute(cc_call_handle_t handle, cc_boolean val);
michael@0 268
michael@0 269
michael@0 270 #endif // _CCAPI_CALL_H_

mercurial