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 _CC_CONSTANTS_H_ |
michael@0 | 6 | #define _CC_CONSTANTS_H_ |
michael@0 | 7 | #include "cc_types.h" |
michael@0 | 8 | |
michael@0 | 9 | #define PC_HANDLE_SIZE 17 /* 8 random bytes in hex plus null */ |
michael@0 | 10 | |
michael@0 | 11 | /** |
michael@0 | 12 | * Max call servers |
michael@0 | 13 | */ |
michael@0 | 14 | #define MAX_CALL_SERVERS 4 |
michael@0 | 15 | |
michael@0 | 16 | /** |
michael@0 | 17 | * Define notification priority |
michael@0 | 18 | */ |
michael@0 | 19 | #define CC_DEF_NOTIFY_PRI 20 |
michael@0 | 20 | #define CC_HR_NOTIFY_PRI 1 |
michael@0 | 21 | |
michael@0 | 22 | #define CC_ALL_LINES 255 |
michael@0 | 23 | #define SID_LINE_SHIFT 16 |
michael@0 | 24 | #define CC_NO_CALL_ID (0) |
michael@0 | 25 | #define CC_NO_LINE (0) |
michael@0 | 26 | #define CC_NO_CALL_INSTANCE (0) |
michael@0 | 27 | |
michael@0 | 28 | #define CC_MAX_LEN_REQ_SUPP_PARAM_CISCO_SISTAG 64 |
michael@0 | 29 | |
michael@0 | 30 | /** |
michael@0 | 31 | * Attrib bit in video available direction byte to indicate if the video is over CAST |
michael@0 | 32 | */ |
michael@0 | 33 | #define CC_ATTRIB_CAST 0x8 |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * Define the line id. The value 0 (CC_NO_LINE) means not set, it will be set by pSipcc system. |
michael@0 | 37 | */ |
michael@0 | 38 | typedef unsigned short cc_lineid_t; |
michael@0 | 39 | |
michael@0 | 40 | /** |
michael@0 | 41 | * Define the call id. The value 0 (CC_NO_CALL_ID) means not set, it will be set by pSipcc system. |
michael@0 | 42 | */ |
michael@0 | 43 | typedef unsigned short cc_callid_t; |
michael@0 | 44 | |
michael@0 | 45 | typedef unsigned short cc_streamid_t; |
michael@0 | 46 | typedef unsigned short cc_mcapid_t; |
michael@0 | 47 | typedef unsigned short cc_groupid_t; |
michael@0 | 48 | typedef unsigned short cc_level_t; |
michael@0 | 49 | |
michael@0 | 50 | /** |
michael@0 | 51 | * Define the call instance id |
michael@0 | 52 | */ |
michael@0 | 53 | |
michael@0 | 54 | typedef unsigned short cc_call_instance_t; |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * Define string char |
michael@0 | 58 | */ |
michael@0 | 59 | typedef const char *cc_string_t; |
michael@0 | 60 | |
michael@0 | 61 | /** |
michael@0 | 62 | * Define an empty call handle |
michael@0 | 63 | */ |
michael@0 | 64 | #define CC_EMPTY_CALL_HANDLE (0) |
michael@0 | 65 | |
michael@0 | 66 | /** |
michael@0 | 67 | * This will be returned by pSipcc system, a user/application should use the following two methods to get the selected or |
michael@0 | 68 | * assinged line id and call id. |
michael@0 | 69 | * When a user or an application doesn't select a line (user passes 0 to pSipcc),, the pSipcc will assign it with the first available |
michael@0 | 70 | * line to it based on the maximum call per line that is configured. |
michael@0 | 71 | */ |
michael@0 | 72 | typedef unsigned int cc_call_handle_t; |
michael@0 | 73 | #define CC_SID_TYPE_SHIFT 28 |
michael@0 | 74 | #define CC_SID_LINE_SHIFT 16 |
michael@0 | 75 | #define CC_SESSIONTYPE_CALLCONTROL 1 |
michael@0 | 76 | #define GET_LINE_ID(call_handle) (cc_lineid_t)((call_handle & 0xFFF0000) >> CC_SID_LINE_SHIFT ) |
michael@0 | 77 | #define GET_CALL_ID(call_handle) (cc_callid_t)(call_handle & 0xFFFF) |
michael@0 | 78 | #define CREATE_CALL_HANDLE(line, callid) (cc_call_handle_t)(((line & 0xFFF) << CC_SID_LINE_SHIFT) + (callid & 0xFFFF)) |
michael@0 | 79 | #define CREATE_CALL_HANDLE_FROM_SESSION_ID(session_id) (session_id & 0xFFFFFFF) |
michael@0 | 80 | #define CREATE_SESSION_ID_FROM_CALL_HANDLE(call_handle) ((CC_SESSIONTYPE_CALLCONTROL << CC_SID_TYPE_SHIFT) + call_handle) |
michael@0 | 81 | |
michael@0 | 82 | /** |
michael@0 | 83 | * Define return codes |
michael@0 | 84 | */ |
michael@0 | 85 | typedef enum { |
michael@0 | 86 | CC_FAILURE = -1, |
michael@0 | 87 | CC_SUCCESS |
michael@0 | 88 | } cc_return_t; |
michael@0 | 89 | |
michael@0 | 90 | /** |
michael@0 | 91 | * Define valid number digits for SendDigit method |
michael@0 | 92 | */ |
michael@0 | 93 | typedef enum { |
michael@0 | 94 | KEY_1 = '1', |
michael@0 | 95 | KEY_2 = '2', |
michael@0 | 96 | KEY_3 = '3', |
michael@0 | 97 | KEY_4 = '4', |
michael@0 | 98 | KEY_5 = '5', |
michael@0 | 99 | KEY_6 = '6', |
michael@0 | 100 | KEY_7 = '7', |
michael@0 | 101 | KEY_8 = '8', |
michael@0 | 102 | KEY_9 = '9', |
michael@0 | 103 | KEY_0 = '0', |
michael@0 | 104 | KEY_STAR = '*', |
michael@0 | 105 | KEY_POUND = '#', |
michael@0 | 106 | KEY_A = 'A', |
michael@0 | 107 | KEY_B = 'B', |
michael@0 | 108 | KEY_C = 'C', |
michael@0 | 109 | KEY_D = 'D', |
michael@0 | 110 | KEY_PLUS = '+' |
michael@0 | 111 | } cc_digit_t; |
michael@0 | 112 | |
michael@0 | 113 | |
michael@0 | 114 | /** |
michael@0 | 115 | * Defines cucm mode of the call manager to which device is connected. |
michael@0 | 116 | */ |
michael@0 | 117 | typedef enum { |
michael@0 | 118 | CC_MODE_INVALID = -1, |
michael@0 | 119 | CC_MODE_CCM, |
michael@0 | 120 | CC_MODE_NONCCM |
michael@0 | 121 | } cc_cucm_mode_t; |
michael@0 | 122 | |
michael@0 | 123 | // Line feature |
michael@0 | 124 | typedef enum { |
michael@0 | 125 | CC_LINE_FEATURE_NONE = 0, |
michael@0 | 126 | CC_LINE_FEATURE_REDIAL = 1, |
michael@0 | 127 | CC_LINE_FEATURE_SPEEDDIAL = 2, |
michael@0 | 128 | CC_LINE_FEATURE_DN = 9, |
michael@0 | 129 | CC_LINE_FEATURE_SERVICE = 20, |
michael@0 | 130 | CC_LINE_FEATURE_SPEEDDIALBLF = 21, |
michael@0 | 131 | CC_LINE_FEATURE_MALICIOUSCALLID = 27, |
michael@0 | 132 | CC_LINE_FEATURE_CALLPICKUP = 127, |
michael@0 | 133 | CC_LINE_FEATURE_GROUPCALLPICKUP = 128, |
michael@0 | 134 | CC_LINE_FEATURE_QUALREPORTTOOL = 133, |
michael@0 | 135 | CC_LINE_FEATURE_OTHERPICKUP = 135, |
michael@0 | 136 | CC_LINE_FEATURE_ALLCALLS = 140, |
michael@0 | 137 | CC_LINE_FEATURE_ANSWEROLDEST = 141, |
michael@0 | 138 | CC_LINE_FEATURE_SERVICES = 192, |
michael@0 | 139 | CC_LINE_FEATURE_BLF = 255 |
michael@0 | 140 | } cc_line_feature_t; |
michael@0 | 141 | |
michael@0 | 142 | /** |
michael@0 | 143 | * Define feature option mask |
michael@0 | 144 | */ |
michael@0 | 145 | typedef enum { |
michael@0 | 146 | CC_FEATUREOPTIONMASK_NONE, |
michael@0 | 147 | CC_FEATUREOPTIONMASK_BLF_PICKUP |
michael@0 | 148 | } cc_feature_option_mask_t; |
michael@0 | 149 | |
michael@0 | 150 | /** |
michael@0 | 151 | * Defines cucm secure levels |
michael@0 | 152 | */ |
michael@0 | 153 | typedef enum { |
michael@0 | 154 | CC_CUCM_NONSECURE, |
michael@0 | 155 | CC_CUCM_AUTHENTICATED, |
michael@0 | 156 | CC_CUCM_ENCRYPTED, |
michael@0 | 157 | CC_CUCM_NOT_IN_CTL |
michael@0 | 158 | } cc_cucm_sec_level_t; |
michael@0 | 159 | |
michael@0 | 160 | /** |
michael@0 | 161 | * Defines cc events causing registration state change |
michael@0 | 162 | */ |
michael@0 | 163 | typedef enum { |
michael@0 | 164 | CC_CAUSE_NONE, |
michael@0 | 165 | CC_CAUSE_FAILOVER, |
michael@0 | 166 | CC_CAUSE_FALLBACK, |
michael@0 | 167 | CC_CAUSE_REG_ALL_FAILED, |
michael@0 | 168 | CC_CAUSE_SHUTDOWN, |
michael@0 | 169 | CC_CAUSE_UNREG_ALL, |
michael@0 | 170 | CC_CAUSE_LOGOUT_RESET |
michael@0 | 171 | } cc_service_cause_t; |
michael@0 | 172 | |
michael@0 | 173 | /** |
michael@0 | 174 | * Defines cc service state |
michael@0 | 175 | */ |
michael@0 | 176 | typedef enum { |
michael@0 | 177 | CC_STATE_IDLE = 0, |
michael@0 | 178 | CC_STATE_INS, |
michael@0 | 179 | CC_STATE_OOS, |
michael@0 | 180 | CC_STATE_PRO_BASE |
michael@0 | 181 | } cc_service_state_t; |
michael@0 | 182 | |
michael@0 | 183 | /** |
michael@0 | 184 | * Define cucm connection status. |
michael@0 | 185 | */ |
michael@0 | 186 | typedef enum { |
michael@0 | 187 | CC_CCM_STATUS_NONE = 0, |
michael@0 | 188 | CC_CCM_STATUS_STANDBY, |
michael@0 | 189 | CC_CCM_STATUS_ACTIVE |
michael@0 | 190 | } cc_ccm_status_t; |
michael@0 | 191 | |
michael@0 | 192 | /** |
michael@0 | 193 | * Define line registration state |
michael@0 | 194 | */ |
michael@0 | 195 | typedef enum { |
michael@0 | 196 | CC_UNREGISTERED, |
michael@0 | 197 | CC_REGISTERED |
michael@0 | 198 | }cc_line_reg_state_t; |
michael@0 | 199 | |
michael@0 | 200 | /** |
michael@0 | 201 | * Defines pSipcc shutdown reason code |
michael@0 | 202 | */ |
michael@0 | 203 | typedef enum { |
michael@0 | 204 | CC_SHUTDOWN_NORMAL, |
michael@0 | 205 | CC_SHUTDOWN_UNSPECIFIED, |
michael@0 | 206 | CC_SHUTDOWN_VERMISMATCH |
michael@0 | 207 | } cc_shutdown_reason_t; |
michael@0 | 208 | |
michael@0 | 209 | /** |
michael@0 | 210 | * Defines kpml value |
michael@0 | 211 | */ |
michael@0 | 212 | typedef enum { |
michael@0 | 213 | CC_KPML_NONE = 0x0, |
michael@0 | 214 | CC_KPML_SIGNAL_ONLY = 0x1, |
michael@0 | 215 | CC_KPML_DTMF_ONLY = 0x2, |
michael@0 | 216 | CC_KPML_BOTH = 0x3 |
michael@0 | 217 | } cc_kpml_config_t; |
michael@0 | 218 | |
michael@0 | 219 | /** |
michael@0 | 220 | * Defines whether to upgrade now or later to recently download firmware image |
michael@0 | 221 | */ |
michael@0 | 222 | typedef enum { |
michael@0 | 223 | CC_UPGRADE_NONE = 0, |
michael@0 | 224 | CC_UPGRADE_NOW, |
michael@0 | 225 | CC_UPGRADE_LATER |
michael@0 | 226 | } cc_upgrade_t; |
michael@0 | 227 | |
michael@0 | 228 | /* Media flow direction */ |
michael@0 | 229 | typedef enum { |
michael@0 | 230 | CC_SDP_DIRECTION_INACTIVE, |
michael@0 | 231 | CC_SDP_DIRECTION_SENDONLY, |
michael@0 | 232 | CC_SDP_DIRECTION_RECVONLY, |
michael@0 | 233 | CC_SDP_DIRECTION_SENDRECV, |
michael@0 | 234 | CC_SDP_MAX_QOS_DIRECTIONS |
michael@0 | 235 | } cc_sdp_direction_t; |
michael@0 | 236 | |
michael@0 | 237 | /** |
michael@0 | 238 | * Defines BLF state |
michael@0 | 239 | */ |
michael@0 | 240 | typedef enum { |
michael@0 | 241 | CC_SIP_BLF_UNKNOWN, |
michael@0 | 242 | CC_SIP_BLF_IDLE, |
michael@0 | 243 | CC_SIP_BLF_INUSE, |
michael@0 | 244 | CC_SIP_BLF_EXPIRED, |
michael@0 | 245 | CC_SIP_BLF_REJECTED, |
michael@0 | 246 | CC_SIP_BLF_ALERTING |
michael@0 | 247 | } cc_blf_state_t; |
michael@0 | 248 | |
michael@0 | 249 | /** |
michael@0 | 250 | * Defines BLF feature mask |
michael@0 | 251 | */ |
michael@0 | 252 | typedef enum { |
michael@0 | 253 | CC_BLF_FEATURE_MASK_NONE = 0, |
michael@0 | 254 | CC_BLF_FEATURE_MASK_PICKUP |
michael@0 | 255 | } cc_blf_feature_mask_t; |
michael@0 | 256 | |
michael@0 | 257 | /** |
michael@0 | 258 | * Defines call state |
michael@0 | 259 | */ |
michael@0 | 260 | typedef enum { |
michael@0 | 261 | OFFHOOK, |
michael@0 | 262 | ONHOOK, |
michael@0 | 263 | RINGOUT, |
michael@0 | 264 | RINGIN, |
michael@0 | 265 | PROCEED, |
michael@0 | 266 | CONNECTED, |
michael@0 | 267 | HOLD, |
michael@0 | 268 | REMHOLD, |
michael@0 | 269 | RESUME, |
michael@0 | 270 | BUSY, |
michael@0 | 271 | REORDER, |
michael@0 | 272 | CONFERENCE, |
michael@0 | 273 | DIALING, |
michael@0 | 274 | REMINUSE, |
michael@0 | 275 | HOLDREVERT, |
michael@0 | 276 | WHISPER, |
michael@0 | 277 | PRESERVATION, |
michael@0 | 278 | WAITINGFORDIGITS = 21, |
michael@0 | 279 | CREATEOFFERSUCCESS, |
michael@0 | 280 | CREATEANSWERSUCCESS, |
michael@0 | 281 | CREATEOFFERERROR, |
michael@0 | 282 | CREATEANSWERERROR, |
michael@0 | 283 | SETLOCALDESCSUCCESS, |
michael@0 | 284 | SETREMOTEDESCSUCCESS, |
michael@0 | 285 | UPDATELOCALDESC, |
michael@0 | 286 | UPDATEREMOTEDESC, |
michael@0 | 287 | SETLOCALDESCERROR, |
michael@0 | 288 | SETREMOTEDESCERROR, |
michael@0 | 289 | REMOTESTREAMADD, |
michael@0 | 290 | ADDICECANDIDATE, |
michael@0 | 291 | ADDICECANDIDATEERROR, |
michael@0 | 292 | FOUNDICECANDIDATE, |
michael@0 | 293 | FOUNDICECANDIDATEERROR, |
michael@0 | 294 | MAX_CALL_STATES |
michael@0 | 295 | } cc_call_state_t; |
michael@0 | 296 | |
michael@0 | 297 | /** |
michael@0 | 298 | * Defines call attribute |
michael@0 | 299 | */ |
michael@0 | 300 | typedef enum { |
michael@0 | 301 | CC_ATTR_NOT_DEFINED = -1, |
michael@0 | 302 | CC_ATTR_NORMAL, |
michael@0 | 303 | CC_ATTR_XFR_CONSULT, |
michael@0 | 304 | CC_ATTR_CONF_CONSULT, |
michael@0 | 305 | CC_ATTR_BARGING, |
michael@0 | 306 | CC_ATTR_RIUHELD_LOCKED, |
michael@0 | 307 | CC_ATTR_LOCAL_CONF_CONSULT, |
michael@0 | 308 | CC_ATTR_LOCAL_XFER_CONSULT, |
michael@0 | 309 | CC_ATTR_CFWDALL, |
michael@0 | 310 | CC_ATTR_GRP_CALL_PICKUP, |
michael@0 | 311 | CC_ATTR_CFWD_ALL, |
michael@0 | 312 | CC_ATTR_MAX |
michael@0 | 313 | } cc_call_attr_t; |
michael@0 | 314 | |
michael@0 | 315 | /** |
michael@0 | 316 | * Defines the hold reason |
michael@0 | 317 | */ |
michael@0 | 318 | typedef enum { |
michael@0 | 319 | CC_HOLD_REASON_NONE, |
michael@0 | 320 | CC_HOLD_REASON_XFER, |
michael@0 | 321 | CC_HOLD_REASON_CONF, |
michael@0 | 322 | CC_HOLD_REASON_SWAP, |
michael@0 | 323 | CC_HOLD_REASON_INTERNAL |
michael@0 | 324 | } cc_hold_reason_t; |
michael@0 | 325 | |
michael@0 | 326 | /** |
michael@0 | 327 | * Defines call type |
michael@0 | 328 | */ |
michael@0 | 329 | typedef enum { |
michael@0 | 330 | CC_CALL_TYPE_NONE, |
michael@0 | 331 | CC_CALL_TYPE_INCOMING, |
michael@0 | 332 | CC_CALL_TYPE_OUTGOING, |
michael@0 | 333 | CC_CALL_TYPE_FORWARDED |
michael@0 | 334 | } cc_call_type_t; |
michael@0 | 335 | |
michael@0 | 336 | /** |
michael@0 | 337 | * Defines call security |
michael@0 | 338 | */ |
michael@0 | 339 | typedef enum { |
michael@0 | 340 | CC_SECURITY_NONE, |
michael@0 | 341 | CC_SECURITY_UNKNOWN, |
michael@0 | 342 | CC_SECURITY_AUTHENTICATED, |
michael@0 | 343 | CC_SECURITY_NOT_AUTHENTICATED, |
michael@0 | 344 | CC_SECURITY_ENCRYPTED |
michael@0 | 345 | } cc_call_security_t; |
michael@0 | 346 | |
michael@0 | 347 | /** |
michael@0 | 348 | * Defines call policy |
michael@0 | 349 | */ |
michael@0 | 350 | typedef enum { |
michael@0 | 351 | /* Call Policy */ |
michael@0 | 352 | CC_POLICY_NONE, |
michael@0 | 353 | CC_POLICY_UNKNOWN, |
michael@0 | 354 | CC_POLICY_CHAPERONE |
michael@0 | 355 | } cc_call_policy_t; |
michael@0 | 356 | |
michael@0 | 357 | /** |
michael@0 | 358 | * Defines Log disposition |
michael@0 | 359 | */ |
michael@0 | 360 | typedef enum { |
michael@0 | 361 | CC_LOGD_MISSED, |
michael@0 | 362 | CC_LOGD_RCVD, |
michael@0 | 363 | CC_LOGD_SENT, |
michael@0 | 364 | CC_LOGD_UNKNWN, |
michael@0 | 365 | CC_LOGD_DELETE |
michael@0 | 366 | } cc_log_disposition_t; |
michael@0 | 367 | |
michael@0 | 368 | /** |
michael@0 | 369 | * Defines call priority |
michael@0 | 370 | */ |
michael@0 | 371 | typedef enum{ |
michael@0 | 372 | CC_PRIORITY_NORMAL, |
michael@0 | 373 | CC_PRIORITY_URGENT |
michael@0 | 374 | } cc_call_priority_t; |
michael@0 | 375 | |
michael@0 | 376 | /** |
michael@0 | 377 | * Defines call selection |
michael@0 | 378 | */ |
michael@0 | 379 | typedef enum { |
michael@0 | 380 | CC_CALL_SELECT_NONE, |
michael@0 | 381 | CC_CALL_SELECT_LOCKED, |
michael@0 | 382 | CC_CALL_SELECT_UNLOCKED, |
michael@0 | 383 | CC_CALL_SELECT_REMOTE_LOCKED |
michael@0 | 384 | } cc_call_selection_t; |
michael@0 | 385 | |
michael@0 | 386 | /** |
michael@0 | 387 | * Defines service control request |
michael@0 | 388 | */ |
michael@0 | 389 | typedef enum { |
michael@0 | 390 | CC_DEVICE_RESET = 1, |
michael@0 | 391 | CC_DEVICE_RESTART, |
michael@0 | 392 | CC_DEVICE_ICMP_UNREACHABLE = 5 |
michael@0 | 393 | } cc_srv_ctrl_req_t; |
michael@0 | 394 | |
michael@0 | 395 | /** |
michael@0 | 396 | * Defines service control command |
michael@0 | 397 | */ |
michael@0 | 398 | typedef enum { |
michael@0 | 399 | CC_ACTION_RESET = 1, |
michael@0 | 400 | CC_ACTION_RESTART |
michael@0 | 401 | } cc_srv_ctrl_cmd_t; |
michael@0 | 402 | |
michael@0 | 403 | /** |
michael@0 | 404 | * Defines messaging type |
michael@0 | 405 | */ |
michael@0 | 406 | typedef enum { |
michael@0 | 407 | CC_VOICE_MESSAGE = 1, |
michael@0 | 408 | CC_TEXT_MESSAGE |
michael@0 | 409 | } cc_message_type_t; |
michael@0 | 410 | |
michael@0 | 411 | /** |
michael@0 | 412 | * Defines handset lamp state |
michael@0 | 413 | */ |
michael@0 | 414 | typedef enum { |
michael@0 | 415 | CC_LAMP_NONE = 0, |
michael@0 | 416 | CC_LAMP_ON, |
michael@0 | 417 | CC_LAMP_BLINK, |
michael@0 | 418 | CC_LAMP_FRESH |
michael@0 | 419 | } cc_lamp_state_t; |
michael@0 | 420 | |
michael@0 | 421 | /** |
michael@0 | 422 | * defines call cause |
michael@0 | 423 | * Important: when update this enum, please update the cc_cause_name accordingly. |
michael@0 | 424 | */ |
michael@0 | 425 | typedef enum { |
michael@0 | 426 | CC_CAUSE_MIN = -1, |
michael@0 | 427 | CC_CAUSE_BASE = -1, |
michael@0 | 428 | CC_CAUSE_OK, |
michael@0 | 429 | CC_CAUSE_ERROR, |
michael@0 | 430 | CC_CAUSE_UNASSIGNED_NUM, |
michael@0 | 431 | CC_CAUSE_NO_RESOURCE, |
michael@0 | 432 | CC_CAUSE_NO_ROUTE, |
michael@0 | 433 | CC_CAUSE_NORMAL, |
michael@0 | 434 | CC_CAUSE_BUSY, |
michael@0 | 435 | CC_CAUSE_NO_USER_RESP, |
michael@0 | 436 | CC_CAUSE_NO_USER_ANS, |
michael@0 | 437 | CC_CAUSE_REJECT, |
michael@0 | 438 | CC_CAUSE_INVALID_NUMBER, |
michael@0 | 439 | CC_CAUSE_FACILITY_REJECTED, |
michael@0 | 440 | CC_CAUSE_CALL_ID_IN_USE, |
michael@0 | 441 | CC_CAUSE_XFER_LOCAL, |
michael@0 | 442 | CC_CAUSE_XFER_REMOTE, |
michael@0 | 443 | CC_CAUSE_XFER_BY_REMOTE, |
michael@0 | 444 | CC_CAUSE_XFER_CNF, |
michael@0 | 445 | CC_CAUSE_CONGESTION, |
michael@0 | 446 | CC_CAUSE_ANONYMOUS, |
michael@0 | 447 | CC_CAUSE_REDIRECT, |
michael@0 | 448 | CC_CAUSE_PAYLOAD_MISMATCH, |
michael@0 | 449 | CC_CAUSE_CONF, |
michael@0 | 450 | CC_CAUSE_REPLACE, |
michael@0 | 451 | CC_CAUSE_NO_REPLACE_CALL, |
michael@0 | 452 | CC_CAUSE_NO_RESUME, |
michael@0 | 453 | CC_CAUSE_NO_MEDIA, |
michael@0 | 454 | CC_CAUSE_REQUEST_PENDING, |
michael@0 | 455 | CC_CAUSE_INVALID_PARTICIPANT, |
michael@0 | 456 | CC_CAUSE_NO_CNF_BRIDE, |
michael@0 | 457 | CC_MAXIMUM_PARTICIPANT, |
michael@0 | 458 | CC_KEY_NOT_ACTIVE, |
michael@0 | 459 | CC_TEMP_NOT_AVAILABLE, |
michael@0 | 460 | CC_CAUSE_REMOTE_SERVER_ERROR, |
michael@0 | 461 | CC_CAUSE_BARGE, |
michael@0 | 462 | CC_CAUSE_CBARGE, |
michael@0 | 463 | CC_CAUSE_NOT_FOUND, |
michael@0 | 464 | CC_CAUSE_SECURITY_FAILURE, |
michael@0 | 465 | CC_CAUSE_MONITOR, |
michael@0 | 466 | CC_CAUSE_UI_STATE_BUSY, |
michael@0 | 467 | CC_SIP_CAUSE_ANSWERED_ELSEWHERE, |
michael@0 | 468 | CC_CAUSE_RETRIEVED, |
michael@0 | 469 | CC_CAUSE_FORWARDED, |
michael@0 | 470 | CC_CAUSE_ABANDONED, |
michael@0 | 471 | CC_CAUSE_XFER_LOCAL_WITH_DIALSTRING, |
michael@0 | 472 | CC_CAUSE_BW_OK, |
michael@0 | 473 | CC_CAUSE_XFER_COMPLETE, |
michael@0 | 474 | CC_CAUSE_RESP_TIMEOUT, |
michael@0 | 475 | CC_CAUSE_SERV_ERR_UNAVAIL, |
michael@0 | 476 | CC_CAUSE_REMOTE_DISCONN_REQ_PLAYTONE, |
michael@0 | 477 | CC_CAUSE_OUT_OF_MEM, |
michael@0 | 478 | CC_CAUSE_VALUE_NOT_FOUND, |
michael@0 | 479 | CC_CAUSE_BAD_ICE_ATTRIBUTE, |
michael@0 | 480 | CC_CAUSE_DTLS_ATTRIBUTE_ERROR, |
michael@0 | 481 | CC_CAUSE_DTLS_DIGEST_ALGORITHM_EMPTY, |
michael@0 | 482 | CC_CAUSE_DTLS_DIGEST_ALGORITHM_TOO_LONG, |
michael@0 | 483 | CC_CAUSE_DTLS_DIGEST_EMPTY, |
michael@0 | 484 | CC_CAUSE_DTLS_DIGEST_TOO_LONG, |
michael@0 | 485 | CC_CAUSE_DTLS_FINGERPRINT_PARSE_ERROR, |
michael@0 | 486 | CC_CAUSE_DTLS_FINGERPRINT_TOO_LONG, |
michael@0 | 487 | CC_CAUSE_INVALID_SDP_POINTER, |
michael@0 | 488 | CC_CAUSE_NO_AUDIO, |
michael@0 | 489 | CC_CAUSE_NO_DTLS_FINGERPRINT, |
michael@0 | 490 | CC_CAUSE_MISSING_ICE_ATTRIBUTES, |
michael@0 | 491 | CC_CAUSE_NO_MEDIA_CAPABILITY, |
michael@0 | 492 | CC_CAUSE_NO_M_LINE, |
michael@0 | 493 | CC_CAUSE_NO_PEERCONNECTION, |
michael@0 | 494 | CC_CAUSE_NO_SDP, |
michael@0 | 495 | CC_CAUSE_NULL_POINTER, |
michael@0 | 496 | CC_CAUSE_SDP_CREATE_FAILED, |
michael@0 | 497 | CC_CAUSE_SDP_ENCODE_FAILED, |
michael@0 | 498 | CC_CAUSE_SDP_PARSE_FAILED, |
michael@0 | 499 | CC_CAUSE_SETTING_ICE_SESSION_PARAMETERS_FAILED, |
michael@0 | 500 | CC_CAUSE_MAX |
michael@0 | 501 | } cc_cause_t; |
michael@0 | 502 | |
michael@0 | 503 | /** |
michael@0 | 504 | * defines subscription event type |
michael@0 | 505 | */ |
michael@0 | 506 | typedef enum { |
michael@0 | 507 | CC_SUBSCRIPTIONS_DIALOG_EXT = 2, |
michael@0 | 508 | CC_SUBSCRIPTIONS_KPML_EXT = 4, |
michael@0 | 509 | CC_SUBSCRIPTIONS_PRESENCE_EXT = 5, |
michael@0 | 510 | CC_SUBSCRIPTIONS_REMOTECC_EXT = 6, |
michael@0 | 511 | CC_SUBSCRIPTIONS_REMOTECC_OPTIONSIND_EXT = 7, |
michael@0 | 512 | CC_SUBSCRIPTIONS_CONFIGAPP_EXT = 8, |
michael@0 | 513 | CC_SUBSCRIPTIONS_MEDIA_INFO_EXT = 10 |
michael@0 | 514 | } cc_subscriptions_ext_t; |
michael@0 | 515 | |
michael@0 | 516 | typedef enum { |
michael@0 | 517 | APPLY_DYNAMICALLY=0, |
michael@0 | 518 | RESTART_NEEDED, |
michael@0 | 519 | APPLY_CONFIG_NONE |
michael@0 | 520 | } cc_apply_config_result_t; |
michael@0 | 521 | |
michael@0 | 522 | |
michael@0 | 523 | /** |
michael@0 | 524 | * defines ID of cucm |
michael@0 | 525 | */ |
michael@0 | 526 | |
michael@0 | 527 | typedef enum { |
michael@0 | 528 | PRIMARY_CCM = 0, |
michael@0 | 529 | SECONDARY_CCM, |
michael@0 | 530 | TERTIARY_CCM, |
michael@0 | 531 | MAX_CCM, |
michael@0 | 532 | UNUSED_PARAM |
michael@0 | 533 | } CCM_ID; |
michael@0 | 534 | |
michael@0 | 535 | typedef enum { |
michael@0 | 536 | CC_SIS_B2B_CONF = 0, |
michael@0 | 537 | CC_SIS_SWAP, |
michael@0 | 538 | CC_SIS_CFWD_ANY_LINE |
michael@0 | 539 | } cc_sis_feature_id_e; |
michael@0 | 540 | |
michael@0 | 541 | /** |
michael@0 | 542 | * enum for conference participant status |
michael@0 | 543 | */ |
michael@0 | 544 | |
michael@0 | 545 | typedef enum { |
michael@0 | 546 | CCAPI_CONFPARTICIPANT_UNKNOWN, |
michael@0 | 547 | CCAPI_CONFPARTICIPANT_DIALING_OUT, |
michael@0 | 548 | CCAPI_CONFPARTICIPANT_ALERTING, |
michael@0 | 549 | CCAPI_CONFPARTICIPANT_CONNECTED, |
michael@0 | 550 | CCAPI_CONFPARTICIPANT_ON_HOLD, |
michael@0 | 551 | CCAPI_CONFPARTICIPANT_DISCONNECTED |
michael@0 | 552 | } cc_conf_participant_status_t; |
michael@0 | 553 | |
michael@0 | 554 | |
michael@0 | 555 | typedef enum { |
michael@0 | 556 | JSEP_NO_ACTION = -1, |
michael@0 | 557 | JSEP_OFFER, |
michael@0 | 558 | JSEP_ANSWER, |
michael@0 | 559 | JSEP_PRANSWER |
michael@0 | 560 | } cc_jsep_action_t; |
michael@0 | 561 | |
michael@0 | 562 | |
michael@0 | 563 | typedef cc_string_t cc_peerconnection_t; |
michael@0 | 564 | |
michael@0 | 565 | typedef unsigned int cc_media_stream_id_t; |
michael@0 | 566 | |
michael@0 | 567 | typedef unsigned int cc_media_track_id_t; |
michael@0 | 568 | |
michael@0 | 569 | |
michael@0 | 570 | typedef enum { |
michael@0 | 571 | NO_STREAM = -1, |
michael@0 | 572 | AUDIO, |
michael@0 | 573 | VIDEO, |
michael@0 | 574 | DATA, |
michael@0 | 575 | TYPE_MAX |
michael@0 | 576 | } cc_media_type_t; |
michael@0 | 577 | |
michael@0 | 578 | typedef struct { |
michael@0 | 579 | cc_boolean was_passed; |
michael@0 | 580 | cc_boolean value; |
michael@0 | 581 | cc_boolean mandatory; |
michael@0 | 582 | } cc_boolean_constraint_t; |
michael@0 | 583 | |
michael@0 | 584 | typedef struct { |
michael@0 | 585 | cc_boolean_constraint_t offer_to_receive_audio; |
michael@0 | 586 | cc_boolean_constraint_t offer_to_receive_video; |
michael@0 | 587 | cc_boolean_constraint_t moz_dont_offer_datachannel; |
michael@0 | 588 | cc_boolean_constraint_t moz_bundle_only; |
michael@0 | 589 | } cc_media_constraints_t; |
michael@0 | 590 | |
michael@0 | 591 | #endif /* _CC_CONSTANTS_H_ */ |
michael@0 | 592 |