Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsIDOMEventTarget.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsIDOMEventListener; |
michael@0 | 8 | interface nsIDOMDOMRequest; |
michael@0 | 9 | interface nsIDOMMozMobileConnectionInfo; |
michael@0 | 10 | interface nsIDOMMozMobileNetworkInfo; |
michael@0 | 11 | interface nsIDOMMozMobileCellInfo; |
michael@0 | 12 | interface nsIDOMMozMobileCFInfo; |
michael@0 | 13 | interface nsIVariant; |
michael@0 | 14 | |
michael@0 | 15 | [scriptable, builtinclass, uuid(389ad352-4e43-4c1a-85e9-bae745554326)] |
michael@0 | 16 | interface nsIDOMMozMobileConnection : nsIDOMEventTarget |
michael@0 | 17 | { |
michael@0 | 18 | const long ICC_SERVICE_CLASS_VOICE = (1 << 0); |
michael@0 | 19 | const long ICC_SERVICE_CLASS_DATA = (1 << 1); |
michael@0 | 20 | const long ICC_SERVICE_CLASS_FAX = (1 << 2); |
michael@0 | 21 | const long ICC_SERVICE_CLASS_SMS = (1 << 3); |
michael@0 | 22 | const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4); |
michael@0 | 23 | const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5); |
michael@0 | 24 | const long ICC_SERVICE_CLASS_PACKET = (1 << 6); |
michael@0 | 25 | const long ICC_SERVICE_CLASS_PAD = (1 << 7); |
michael@0 | 26 | const long ICC_SERVICE_CLASS_MAX = (1 << 7); |
michael@0 | 27 | |
michael@0 | 28 | /** |
michael@0 | 29 | * Call barring program. |
michael@0 | 30 | * |
michael@0 | 31 | * (0) all outgoing. |
michael@0 | 32 | * (1) outgoing international. |
michael@0 | 33 | * (2) outgoing international except to home country. |
michael@0 | 34 | * (3) all incoming. |
michael@0 | 35 | * (4) incoming when roaming outside the home country. |
michael@0 | 36 | */ |
michael@0 | 37 | const long CALL_BARRING_PROGRAM_ALL_OUTGOING = 0; |
michael@0 | 38 | const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL = 1; |
michael@0 | 39 | const long CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2; |
michael@0 | 40 | const long CALL_BARRING_PROGRAM_ALL_INCOMING = 3; |
michael@0 | 41 | const long CALL_BARRING_PROGRAM_INCOMING_ROAMING = 4; |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * Calling line identification restriction constants. |
michael@0 | 45 | * |
michael@0 | 46 | * @see 3GPP TS 27.007 7.7 Defined values |
michael@0 | 47 | * |
michael@0 | 48 | * (0) Uses subscription default value. |
michael@0 | 49 | * (1) Restricts CLI presentation. |
michael@0 | 50 | * (2) Allows CLI presentation. |
michael@0 | 51 | */ |
michael@0 | 52 | const long CLIR_DEFAULT = 0; |
michael@0 | 53 | const long CLIR_INVOCATION = 1; |
michael@0 | 54 | const long CLIR_SUPPRESSION = 2; |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * These two fields can be accessed by privileged applications with the |
michael@0 | 58 | * 'mobilenetwork' permission. |
michael@0 | 59 | */ |
michael@0 | 60 | readonly attribute DOMString lastKnownNetwork; |
michael@0 | 61 | readonly attribute DOMString lastKnownHomeNetwork; |
michael@0 | 62 | |
michael@0 | 63 | /** |
michael@0 | 64 | * Information about the voice connection. |
michael@0 | 65 | */ |
michael@0 | 66 | readonly attribute nsIDOMMozMobileConnectionInfo voice; |
michael@0 | 67 | |
michael@0 | 68 | /** |
michael@0 | 69 | * Information about the data connection. |
michael@0 | 70 | */ |
michael@0 | 71 | readonly attribute nsIDOMMozMobileConnectionInfo data; |
michael@0 | 72 | |
michael@0 | 73 | /** |
michael@0 | 74 | * Integrated Circuit Card Identifier of the SIM this |
michael@0 | 75 | * mobile connection corresponds to. |
michael@0 | 76 | */ |
michael@0 | 77 | readonly attribute DOMString iccId; |
michael@0 | 78 | |
michael@0 | 79 | /** |
michael@0 | 80 | * The selection mode of the voice and data networks. |
michael@0 | 81 | * |
michael@0 | 82 | * Possible values: null (unknown), 'automatic', 'manual' |
michael@0 | 83 | */ |
michael@0 | 84 | readonly attribute DOMString networkSelectionMode; |
michael@0 | 85 | |
michael@0 | 86 | /** |
michael@0 | 87 | * The current radio state. |
michael@0 | 88 | * |
michael@0 | 89 | * Possible values: null (unknown), 'enabling', 'enabled', 'disabling', |
michael@0 | 90 | * 'disabled' |
michael@0 | 91 | */ |
michael@0 | 92 | readonly attribute DOMString radioState; |
michael@0 | 93 | |
michael@0 | 94 | /** |
michael@0 | 95 | * Array of network types that are supported by this radio. |
michael@0 | 96 | * |
michael@0 | 97 | * Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte' |
michael@0 | 98 | */ |
michael@0 | 99 | readonly attribute nsIVariant supportedNetworkTypes; |
michael@0 | 100 | |
michael@0 | 101 | /** |
michael@0 | 102 | * Search for available networks. |
michael@0 | 103 | * |
michael@0 | 104 | * If successful, the request's onsuccess will be called, and the request's |
michael@0 | 105 | * result will be an array of nsIDOMMozMobileNetworkInfo. |
michael@0 | 106 | * |
michael@0 | 107 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 108 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 109 | * or 'GenericFailure'. |
michael@0 | 110 | */ |
michael@0 | 111 | nsIDOMDOMRequest getNetworks(); |
michael@0 | 112 | |
michael@0 | 113 | /** |
michael@0 | 114 | * Manually selects the passed in network, overriding the radio's current |
michael@0 | 115 | * selection. |
michael@0 | 116 | * |
michael@0 | 117 | * If successful, the request's onsuccess will be called. |
michael@0 | 118 | * Note: If the network was actually changed by this request, |
michael@0 | 119 | * the 'voicechange' and 'datachange' events will also be fired. |
michael@0 | 120 | * |
michael@0 | 121 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 122 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 123 | * 'IllegalSIMorME', or 'GenericFailure' |
michael@0 | 124 | */ |
michael@0 | 125 | nsIDOMDOMRequest selectNetwork(in nsIDOMMozMobileNetworkInfo network); |
michael@0 | 126 | |
michael@0 | 127 | /** |
michael@0 | 128 | * Tell the radio to automatically select a network. |
michael@0 | 129 | * |
michael@0 | 130 | * If successful, the request's onsuccess will be called. |
michael@0 | 131 | * Note: If the network was actually changed by this request, the |
michael@0 | 132 | * 'voicechange' and 'datachange' events will also be fired. |
michael@0 | 133 | * |
michael@0 | 134 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 135 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 136 | * 'IllegalSIMorME', or 'GenericFailure' |
michael@0 | 137 | */ |
michael@0 | 138 | nsIDOMDOMRequest selectNetworkAutomatically(); |
michael@0 | 139 | |
michael@0 | 140 | /** |
michael@0 | 141 | * Set preferred network type |
michael@0 | 142 | * |
michael@0 | 143 | * @param type |
michael@0 | 144 | * DOMString indicates the desired preferred network type. |
michael@0 | 145 | * Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', |
michael@0 | 146 | * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', |
michael@0 | 147 | * 'lte/cdma/evdo', 'lte/wcdma/gsm', |
michael@0 | 148 | * 'lte/wcdma/gsm/cdma/evdo' or 'lte'. |
michael@0 | 149 | * |
michael@0 | 150 | * If successful, the request's onsuccess will be called. |
michael@0 | 151 | * |
michael@0 | 152 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 153 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 154 | * 'InvalidParameter', 'ModeNotSupported' or 'GenericFailure' |
michael@0 | 155 | * |
michael@0 | 156 | * TODO: param "type" should be a WebIDL enum when this interface is converted |
michael@0 | 157 | * to WebIDL |
michael@0 | 158 | */ |
michael@0 | 159 | nsIDOMDOMRequest setPreferredNetworkType(in DOMString type); |
michael@0 | 160 | |
michael@0 | 161 | /** |
michael@0 | 162 | * Query current preferred network type |
michael@0 | 163 | * |
michael@0 | 164 | * If successful, the request's onsuccess will be called. And the request's |
michael@0 | 165 | * result will be a string indicating the current preferred network type. |
michael@0 | 166 | * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto', |
michael@0 | 167 | * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo', |
michael@0 | 168 | * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or 'lte'. |
michael@0 | 169 | * |
michael@0 | 170 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 171 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 172 | * or 'GenericFailure' |
michael@0 | 173 | */ |
michael@0 | 174 | nsIDOMDOMRequest getPreferredNetworkType(); |
michael@0 | 175 | |
michael@0 | 176 | /** |
michael@0 | 177 | * Set roaming preference |
michael@0 | 178 | * |
michael@0 | 179 | * @param mode |
michael@0 | 180 | * DOMString indicates the desired roaming preference. |
michael@0 | 181 | * Possible values: 'home', 'affiliated', or 'any'. |
michael@0 | 182 | * |
michael@0 | 183 | * If successful, the request's onsuccess will be called. |
michael@0 | 184 | * |
michael@0 | 185 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 186 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 187 | * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' |
michael@0 | 188 | * |
michael@0 | 189 | * TODO: param "mode" should be a WebIDL enum when this interface is converted |
michael@0 | 190 | * to WebIDL |
michael@0 | 191 | */ |
michael@0 | 192 | nsIDOMDOMRequest setRoamingPreference(in DOMString mode); |
michael@0 | 193 | |
michael@0 | 194 | /** |
michael@0 | 195 | * Query current roaming preference |
michael@0 | 196 | * |
michael@0 | 197 | * If successful, the request's onsuccess will be called. And the request's |
michael@0 | 198 | * result will be a string indicating the current roaming preference. |
michael@0 | 199 | * The value will be either 'home', 'affiliated', or 'any'. |
michael@0 | 200 | * |
michael@0 | 201 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 202 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 203 | * 'IllegalSIMorME', or 'GenericFailure' |
michael@0 | 204 | */ |
michael@0 | 205 | nsIDOMDOMRequest getRoamingPreference(); |
michael@0 | 206 | |
michael@0 | 207 | /** |
michael@0 | 208 | * Set voice privacy preference. |
michael@0 | 209 | * |
michael@0 | 210 | * @param enabled |
michael@0 | 211 | * Boolean indicates the preferred voice privacy mode used in voice |
michael@0 | 212 | * scrambling in CDMA networks. 'True' means the enhanced voice security |
michael@0 | 213 | * is required. |
michael@0 | 214 | * |
michael@0 | 215 | * If successful, the request's onsuccess will be called. |
michael@0 | 216 | * |
michael@0 | 217 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 218 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 219 | * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' |
michael@0 | 220 | */ |
michael@0 | 221 | nsIDOMDOMRequest setVoicePrivacyMode(in bool enabled); |
michael@0 | 222 | |
michael@0 | 223 | /** |
michael@0 | 224 | * Query current voice privacy mode. |
michael@0 | 225 | * |
michael@0 | 226 | * If successful, the request's onsuccess will be called. And the request's |
michael@0 | 227 | * result will be a boolean indicating the current voice privacy mode. |
michael@0 | 228 | * |
michael@0 | 229 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 230 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 231 | * 'IllegalSIMorME', or 'GenericFailure' |
michael@0 | 232 | */ |
michael@0 | 233 | nsIDOMDOMRequest getVoicePrivacyMode(); |
michael@0 | 234 | |
michael@0 | 235 | /** |
michael@0 | 236 | * Send a MMI message. |
michael@0 | 237 | * |
michael@0 | 238 | * @param mmi |
michael@0 | 239 | * DOMString containing an MMI string that can be associated to a |
michael@0 | 240 | * USSD request or other RIL functionality. |
michael@0 | 241 | * |
michael@0 | 242 | * @return a nsIDOMDOMRequest |
michael@0 | 243 | * The request's result will be an object containing information |
michael@0 | 244 | * about the operation. |
michael@0 | 245 | * |
michael@0 | 246 | * In case that the MMI code requires sending an USSD request, the DOMrequest |
michael@0 | 247 | * 'success' event means that the RIL has successfully processed and sent the |
michael@0 | 248 | * USSD request to the network. The network reply will be reported via |
michael@0 | 249 | * 'onussdreceived' event. If the MMI code is not associated to a USSD but to |
michael@0 | 250 | * other RIL request its result, if one is needed, will be notified via the |
michael@0 | 251 | * returned DOMRequest 'success' or 'error' event. |
michael@0 | 252 | */ |
michael@0 | 253 | nsIDOMDOMRequest sendMMI(in DOMString mmi); |
michael@0 | 254 | |
michael@0 | 255 | /** |
michael@0 | 256 | * Cancel the current MMI request if one exists. |
michael@0 | 257 | */ |
michael@0 | 258 | nsIDOMDOMRequest cancelMMI(); |
michael@0 | 259 | |
michael@0 | 260 | /** |
michael@0 | 261 | * Configures call forward options. |
michael@0 | 262 | * |
michael@0 | 263 | * @param CFInfo |
michael@0 | 264 | * An object containing the call forward rule to set. |
michael@0 | 265 | * |
michael@0 | 266 | * If successful, the request's onsuccess will be called. |
michael@0 | 267 | * |
michael@0 | 268 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 269 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 270 | * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' |
michael@0 | 271 | */ |
michael@0 | 272 | nsIDOMDOMRequest setCallForwardingOption(in nsIDOMMozMobileCFInfo CFInfo); |
michael@0 | 273 | |
michael@0 | 274 | /** |
michael@0 | 275 | * Queries current call forward options. |
michael@0 | 276 | * |
michael@0 | 277 | * @param reason |
michael@0 | 278 | * Indicates the reason the call is being forwarded. It will be either |
michael@0 | 279 | * unconditional (0), mobile busy (1), no reply (2), not reachable (3), |
michael@0 | 280 | * all call forwarding (4), or all conditional call forwarding (5). |
michael@0 | 281 | * |
michael@0 | 282 | * If successful, the request's onsuccess will be called, and the request's |
michael@0 | 283 | * result will be an array of nsIDOMMozMobileCFInfo. |
michael@0 | 284 | * |
michael@0 | 285 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 286 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 287 | * 'InvalidParameter', or 'GenericFailure'. |
michael@0 | 288 | */ |
michael@0 | 289 | nsIDOMDOMRequest getCallForwardingOption(in unsigned short reason); |
michael@0 | 290 | |
michael@0 | 291 | /** |
michael@0 | 292 | * Configures call barring option. |
michael@0 | 293 | * |
michael@0 | 294 | * @param option |
michael@0 | 295 | * An object containing the call barring rule to set. |
michael@0 | 296 | * @see MozCallBarringOption for the detail of info. |
michael@0 | 297 | * |
michael@0 | 298 | * If successful, the request's onsuccess will be called. |
michael@0 | 299 | * |
michael@0 | 300 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 301 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 302 | * 'IllegalSIMorME', 'InvalidParameter', or 'GenericFailure' |
michael@0 | 303 | */ |
michael@0 | 304 | nsIDOMDOMRequest setCallBarringOption(in jsval option); |
michael@0 | 305 | |
michael@0 | 306 | /** |
michael@0 | 307 | * Queries current call barring status. |
michael@0 | 308 | * |
michael@0 | 309 | * @param info |
michael@0 | 310 | * An object containing the call barring rule to query. No need to |
michael@0 | 311 | * specify 'enabled' property. |
michael@0 | 312 | * @see MozCallBarringOption for the detail of info. |
michael@0 | 313 | * |
michael@0 | 314 | * If successful, the request's onsuccess will be called, and the request's |
michael@0 | 315 | * result will be an object of MozCallBarringOption with correct 'enabled' |
michael@0 | 316 | * property indicating the status of this rule. |
michael@0 | 317 | * |
michael@0 | 318 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 319 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 320 | * 'InvalidParameter', or 'GenericFailure'. |
michael@0 | 321 | */ |
michael@0 | 322 | nsIDOMDOMRequest getCallBarringOption(in jsval option); |
michael@0 | 323 | |
michael@0 | 324 | /** |
michael@0 | 325 | * Change call barring facility password. |
michael@0 | 326 | * |
michael@0 | 327 | * @param info |
michael@0 | 328 | * An object containing information about pin and newPin, and, |
michael@0 | 329 | * this object must have both "pin" and "newPin" attributes |
michael@0 | 330 | * to change the call barring facility password. |
michael@0 | 331 | * |
michael@0 | 332 | * Example: |
michael@0 | 333 | * |
michael@0 | 334 | * changeCallBarringPassword({pin: "...", |
michael@0 | 335 | * newPin: "..."}); |
michael@0 | 336 | */ |
michael@0 | 337 | nsIDOMDOMRequest changeCallBarringPassword(in jsval info); |
michael@0 | 338 | |
michael@0 | 339 | /** |
michael@0 | 340 | * Configures call waiting options. |
michael@0 | 341 | * |
michael@0 | 342 | * @param enabled |
michael@0 | 343 | * Value containing the desired call waiting status. |
michael@0 | 344 | * |
michael@0 | 345 | * If successful, the request's onsuccess will be called. |
michael@0 | 346 | * |
michael@0 | 347 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 348 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 349 | * 'IllegalSIMorME', or 'GenericFailure' |
michael@0 | 350 | */ |
michael@0 | 351 | nsIDOMDOMRequest setCallWaitingOption(in bool enabled); |
michael@0 | 352 | |
michael@0 | 353 | /** |
michael@0 | 354 | * Queries current call waiting options. |
michael@0 | 355 | * |
michael@0 | 356 | * If successful, the request's onsuccess will be called, and the request's |
michael@0 | 357 | * result will be a boolean indicating the call waiting status. |
michael@0 | 358 | * |
michael@0 | 359 | * |
michael@0 | 360 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 361 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 362 | * or 'GenericFailure'. |
michael@0 | 363 | */ |
michael@0 | 364 | nsIDOMDOMRequest getCallWaitingOption(); |
michael@0 | 365 | |
michael@0 | 366 | /** |
michael@0 | 367 | * Enables or disables the presentation of the calling line identity (CLI) to |
michael@0 | 368 | * the called party when originating a call. |
michael@0 | 369 | * |
michael@0 | 370 | * @param clirMode |
michael@0 | 371 | * Is one of the CLIR_* constants. |
michael@0 | 372 | * |
michael@0 | 373 | * If successful, the request's onsuccess will be called. |
michael@0 | 374 | * |
michael@0 | 375 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 376 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 377 | */ |
michael@0 | 378 | nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned short clirMode); |
michael@0 | 379 | |
michael@0 | 380 | /** |
michael@0 | 381 | * Queries current CLIR status. |
michael@0 | 382 | * |
michael@0 | 383 | * If successful, the request's onsuccess will be called, and the request's |
michael@0 | 384 | * result will be a DOMCLIRStatus dictionary containing CLIR 'n' and 'm' |
michael@0 | 385 | * parameter. |
michael@0 | 386 | * |
michael@0 | 387 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 388 | * will be either 'RadioNotAvailable', 'RequestNotSupported', |
michael@0 | 389 | * or 'GenericFailure'. |
michael@0 | 390 | */ |
michael@0 | 391 | nsIDOMDOMRequest getCallingLineIdRestriction(); |
michael@0 | 392 | |
michael@0 | 393 | /** |
michael@0 | 394 | * Exit emergency callback mode. |
michael@0 | 395 | * |
michael@0 | 396 | * If successful, the request's onsuccess will be called. |
michael@0 | 397 | * |
michael@0 | 398 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 399 | * will be either 'RequestNotSupported' or 'GenericFailure'. |
michael@0 | 400 | */ |
michael@0 | 401 | nsIDOMDOMRequest exitEmergencyCbMode(); |
michael@0 | 402 | |
michael@0 | 403 | /** |
michael@0 | 404 | * Set radio enabled/disabled. |
michael@0 | 405 | * |
michael@0 | 406 | * @param enabled |
michael@0 | 407 | * True to enable the radio. |
michael@0 | 408 | * |
michael@0 | 409 | * If successful, the request's onsuccess will be called. |
michael@0 | 410 | * |
michael@0 | 411 | * Otherwise, the request's onerror will be called, and the request's error |
michael@0 | 412 | * will be either 'InvalidStateError', 'RadioNotAvailable', or |
michael@0 | 413 | * 'GenericFailure'. |
michael@0 | 414 | * |
michael@0 | 415 | * Note: Request is not available when radioState is null, 'enabling', or |
michael@0 | 416 | * 'disabling'. Calling the function in above conditions will receive |
michael@0 | 417 | * 'InvalidStateError' error. |
michael@0 | 418 | */ |
michael@0 | 419 | nsIDOMDOMRequest setRadioEnabled(in boolean enabled); |
michael@0 | 420 | |
michael@0 | 421 | /** |
michael@0 | 422 | * The 'voicechange' event is notified whenever the voice connection object |
michael@0 | 423 | * changes. |
michael@0 | 424 | */ |
michael@0 | 425 | [implicit_jscontext] attribute jsval onvoicechange; |
michael@0 | 426 | |
michael@0 | 427 | /** |
michael@0 | 428 | * The 'datachange' event is notified whenever the data connection object |
michael@0 | 429 | * changes values. |
michael@0 | 430 | */ |
michael@0 | 431 | [implicit_jscontext] attribute jsval ondatachange; |
michael@0 | 432 | |
michael@0 | 433 | /** |
michael@0 | 434 | * The 'ussdreceived' event is notified whenever a new USSD message is |
michael@0 | 435 | * received. |
michael@0 | 436 | */ |
michael@0 | 437 | [implicit_jscontext] attribute jsval onussdreceived; |
michael@0 | 438 | |
michael@0 | 439 | /** |
michael@0 | 440 | * The 'dataerror' event is notified whenever the data connection object |
michael@0 | 441 | * receives an error from the RIL |
michael@0 | 442 | */ |
michael@0 | 443 | [implicit_jscontext] attribute jsval ondataerror; |
michael@0 | 444 | |
michael@0 | 445 | /** |
michael@0 | 446 | * The 'oncfstatechange' event is notified whenever the call forwarding |
michael@0 | 447 | * state changes. |
michael@0 | 448 | */ |
michael@0 | 449 | [implicit_jscontext] attribute jsval oncfstatechange; |
michael@0 | 450 | |
michael@0 | 451 | /** |
michael@0 | 452 | * The 'emergencycbmodechange' event is notified whenever the emergency |
michael@0 | 453 | * callback mode changes. |
michael@0 | 454 | */ |
michael@0 | 455 | [implicit_jscontext] attribute jsval onemergencycbmodechange; |
michael@0 | 456 | |
michael@0 | 457 | /** |
michael@0 | 458 | * The 'onotastatuschange' event is notified whenever the ota provision status |
michael@0 | 459 | * changes. |
michael@0 | 460 | */ |
michael@0 | 461 | [implicit_jscontext] attribute jsval onotastatuschange; |
michael@0 | 462 | |
michael@0 | 463 | /** |
michael@0 | 464 | * The 'oniccchange' event is notified whenever the iccid value |
michael@0 | 465 | * changes. |
michael@0 | 466 | */ |
michael@0 | 467 | [implicit_jscontext] attribute jsval oniccchange; |
michael@0 | 468 | |
michael@0 | 469 | /** |
michael@0 | 470 | * The 'onradiostatechange' event is notified whenever the radio state |
michael@0 | 471 | * changes. |
michael@0 | 472 | */ |
michael@0 | 473 | [implicit_jscontext] attribute jsval onradiostatechange; |
michael@0 | 474 | }; |
michael@0 | 475 | |
michael@0 | 476 | [scriptable, uuid(49706beb-a160-40b7-b745-50f62e389a2c)] |
michael@0 | 477 | interface nsIDOMMozMobileConnectionInfo : nsISupports |
michael@0 | 478 | { |
michael@0 | 479 | /** |
michael@0 | 480 | * State of the connection. |
michael@0 | 481 | * |
michael@0 | 482 | * Possible values: 'notSearching', 'searching', 'denied', 'registered'. |
michael@0 | 483 | * null if the state is unknown. |
michael@0 | 484 | */ |
michael@0 | 485 | readonly attribute DOMString state; |
michael@0 | 486 | |
michael@0 | 487 | /** |
michael@0 | 488 | * Indicates whether the connection is ready. This may be different |
michael@0 | 489 | */ |
michael@0 | 490 | readonly attribute bool connected; |
michael@0 | 491 | |
michael@0 | 492 | /** |
michael@0 | 493 | * Indicates whether only emergency calls are possible. |
michael@0 | 494 | * |
michael@0 | 495 | * This flag is only relevant to voice connections and when 'connected' is |
michael@0 | 496 | * false. |
michael@0 | 497 | */ |
michael@0 | 498 | readonly attribute bool emergencyCallsOnly; |
michael@0 | 499 | |
michael@0 | 500 | /** |
michael@0 | 501 | * Indicates whether the connection is going through a foreign operator |
michael@0 | 502 | * (roaming) or not. |
michael@0 | 503 | */ |
michael@0 | 504 | readonly attribute bool roaming; |
michael@0 | 505 | |
michael@0 | 506 | /** |
michael@0 | 507 | * Network operator |
michael@0 | 508 | */ |
michael@0 | 509 | readonly attribute nsIDOMMozMobileNetworkInfo network; |
michael@0 | 510 | |
michael@0 | 511 | /** |
michael@0 | 512 | * Type of connection. |
michael@0 | 513 | * |
michael@0 | 514 | * Possible values: 'gsm', 'cdma', gprs', 'edge', 'umts', 'hsdpa', 'evdo0', |
michael@0 | 515 | * 'evdoa', 'evdob', etc. |
michael@0 | 516 | */ |
michael@0 | 517 | readonly attribute DOMString type; |
michael@0 | 518 | |
michael@0 | 519 | /** |
michael@0 | 520 | * Signal strength in dBm, or null if no service is available. |
michael@0 | 521 | */ |
michael@0 | 522 | readonly attribute jsval signalStrength; |
michael@0 | 523 | |
michael@0 | 524 | /** |
michael@0 | 525 | * Signal strength, represented linearly as a number between 0 (weakest |
michael@0 | 526 | * signal) and 100 (full signal). |
michael@0 | 527 | */ |
michael@0 | 528 | readonly attribute jsval relSignalStrength; |
michael@0 | 529 | |
michael@0 | 530 | /** |
michael@0 | 531 | * Cell location. |
michael@0 | 532 | */ |
michael@0 | 533 | readonly attribute nsIDOMMozMobileCellInfo cell; |
michael@0 | 534 | |
michael@0 | 535 | }; |
michael@0 | 536 | |
michael@0 | 537 | [scriptable, uuid(40018fc7-4c42-47b6-8de6-3591a9c622bc)] |
michael@0 | 538 | interface nsIDOMMozMobileNetworkInfo: nsISupports |
michael@0 | 539 | { |
michael@0 | 540 | /** |
michael@0 | 541 | * Short name of the network operator |
michael@0 | 542 | */ |
michael@0 | 543 | readonly attribute DOMString shortName; |
michael@0 | 544 | |
michael@0 | 545 | /** |
michael@0 | 546 | * Long name of the network operator |
michael@0 | 547 | */ |
michael@0 | 548 | readonly attribute DOMString longName; |
michael@0 | 549 | |
michael@0 | 550 | /** |
michael@0 | 551 | * Mobile Country Code (MCC) of the network operator |
michael@0 | 552 | */ |
michael@0 | 553 | readonly attribute DOMString mcc; |
michael@0 | 554 | |
michael@0 | 555 | /** |
michael@0 | 556 | * Mobile Network Code (MNC) of the network operator |
michael@0 | 557 | */ |
michael@0 | 558 | readonly attribute DOMString mnc; |
michael@0 | 559 | |
michael@0 | 560 | /** |
michael@0 | 561 | * State of this network operator. |
michael@0 | 562 | * |
michael@0 | 563 | * Possible values: 'available', 'connected', 'forbidden', or null (unknown) |
michael@0 | 564 | */ |
michael@0 | 565 | readonly attribute DOMString state; |
michael@0 | 566 | }; |
michael@0 | 567 | |
michael@0 | 568 | [scriptable, uuid(9750b3a7-d913-436e-95d4-7ef2973ec6a1)] |
michael@0 | 569 | interface nsIDOMMozMobileCellInfo: nsISupports |
michael@0 | 570 | { |
michael@0 | 571 | /** |
michael@0 | 572 | * Mobile Location Area Code (LAC) for GSM/WCDMA networks. |
michael@0 | 573 | * |
michael@0 | 574 | * Possible ranges from 0x0000 to 0xffff. |
michael@0 | 575 | * -1 if the LAC is unknown. |
michael@0 | 576 | */ |
michael@0 | 577 | readonly attribute long gsmLocationAreaCode; |
michael@0 | 578 | |
michael@0 | 579 | /** |
michael@0 | 580 | * Mobile Cell ID for GSM/WCDMA networks. |
michael@0 | 581 | * |
michael@0 | 582 | * Possible ranges from 0x00000000 to 0xffffffff. |
michael@0 | 583 | * -1 if the cell id is unknown. |
michael@0 | 584 | */ |
michael@0 | 585 | readonly attribute long long gsmCellId; |
michael@0 | 586 | |
michael@0 | 587 | /** |
michael@0 | 588 | * Base Station ID for CDMA networks. |
michael@0 | 589 | * |
michael@0 | 590 | * Possible ranges from 0 to 65535 |
michael@0 | 591 | * -1 if the base station id is unknown. |
michael@0 | 592 | */ |
michael@0 | 593 | readonly attribute long cdmaBaseStationId; |
michael@0 | 594 | |
michael@0 | 595 | /** |
michael@0 | 596 | * Base Station Latitude for CDMA networks. |
michael@0 | 597 | * |
michael@0 | 598 | * Possible ranges from -1296000 to 1296000. |
michael@0 | 599 | * -2147483648 if the latitude is unknown. |
michael@0 | 600 | * |
michael@0 | 601 | * @see 3GPP2 C.S0005-A v6.0. |
michael@0 | 602 | */ |
michael@0 | 603 | readonly attribute long cdmaBaseStationLatitude; |
michael@0 | 604 | |
michael@0 | 605 | /** |
michael@0 | 606 | * Base Station Longitude for CDMA networks. |
michael@0 | 607 | * |
michael@0 | 608 | * Possible ranges from -2592000 to 2592000. |
michael@0 | 609 | * -2147483648 if the longitude is unknown. |
michael@0 | 610 | * |
michael@0 | 611 | * @see 3GPP2 C.S0005-A v6.0. |
michael@0 | 612 | */ |
michael@0 | 613 | readonly attribute long cdmaBaseStationLongitude; |
michael@0 | 614 | |
michael@0 | 615 | /** |
michael@0 | 616 | * System ID for CDMA networks. |
michael@0 | 617 | * |
michael@0 | 618 | * Possible ranges from 0 to 32767. |
michael@0 | 619 | * -1 if the system id is unknown. |
michael@0 | 620 | */ |
michael@0 | 621 | readonly attribute long cdmaSystemId; |
michael@0 | 622 | |
michael@0 | 623 | /** |
michael@0 | 624 | * Network ID for CDMA networks. |
michael@0 | 625 | * |
michael@0 | 626 | * Possible ranges from 0 to 65535. |
michael@0 | 627 | * -1 if the network id is unknown. |
michael@0 | 628 | */ |
michael@0 | 629 | readonly attribute long cdmaNetworkId; |
michael@0 | 630 | }; |
michael@0 | 631 | |
michael@0 | 632 | [scriptable, uuid(d1b35ad8-99aa-47cc-ab49-2e72b00e39df)] |
michael@0 | 633 | interface nsIDOMMozMobileCFInfo : nsISupports |
michael@0 | 634 | { |
michael@0 | 635 | /** |
michael@0 | 636 | * Call forwarding rule status. |
michael@0 | 637 | * |
michael@0 | 638 | * It will be either not active (false), or active (true). |
michael@0 | 639 | * |
michael@0 | 640 | * Note: Unused for setting call forwarding options. It reports |
michael@0 | 641 | * the status of the rule when getting how the rule is |
michael@0 | 642 | * configured. |
michael@0 | 643 | * |
michael@0 | 644 | * @see 3GPP TS 27.007 7.11 "status". |
michael@0 | 645 | */ |
michael@0 | 646 | readonly attribute bool active; |
michael@0 | 647 | |
michael@0 | 648 | const long CALL_FORWARD_ACTION_DISABLE = 0; |
michael@0 | 649 | const long CALL_FORWARD_ACTION_ENABLE = 1; |
michael@0 | 650 | const long CALL_FORWARD_ACTION_QUERY_STATUS = 2; |
michael@0 | 651 | const long CALL_FORWARD_ACTION_REGISTRATION = 3; |
michael@0 | 652 | const long CALL_FORWARD_ACTION_ERASURE = 4; |
michael@0 | 653 | |
michael@0 | 654 | /** |
michael@0 | 655 | * Indicates what to do with the rule. |
michael@0 | 656 | * |
michael@0 | 657 | * One of the CALL_FORWARD_ACTION_* constants. It will be either disable (0), |
michael@0 | 658 | * enable (1), query status (2), registration (3), or erasure (4). |
michael@0 | 659 | * |
michael@0 | 660 | * @see 3GPP TS 27.007 7.11 "mode". |
michael@0 | 661 | */ |
michael@0 | 662 | readonly attribute unsigned short action; |
michael@0 | 663 | |
michael@0 | 664 | const long CALL_FORWARD_REASON_UNCONDITIONAL = 0; |
michael@0 | 665 | const long CALL_FORWARD_REASON_MOBILE_BUSY = 1; |
michael@0 | 666 | const long CALL_FORWARD_REASON_NO_REPLY = 2; |
michael@0 | 667 | const long CALL_FORWARD_REASON_NOT_REACHABLE = 3; |
michael@0 | 668 | const long CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4; |
michael@0 | 669 | const long CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5; |
michael@0 | 670 | |
michael@0 | 671 | /** |
michael@0 | 672 | * Indicates the reason the call is being forwarded. |
michael@0 | 673 | * |
michael@0 | 674 | * One of the CALL_FORWARD_REASON_* constants. It will be either |
michael@0 | 675 | * unconditional (0), mobile busy (1), no reply (2), not reachable (3), |
michael@0 | 676 | * all call forwarding (4), or all conditional call forwarding (5). |
michael@0 | 677 | * |
michael@0 | 678 | * @see 3GPP TS 27.007 7.11 "reason". |
michael@0 | 679 | */ |
michael@0 | 680 | readonly attribute unsigned short reason; |
michael@0 | 681 | |
michael@0 | 682 | /** |
michael@0 | 683 | * Phone number of forwarding address. |
michael@0 | 684 | */ |
michael@0 | 685 | readonly attribute DOMString number; |
michael@0 | 686 | |
michael@0 | 687 | /** |
michael@0 | 688 | * When "no reply" is enabled or queried, this gives the time in |
michael@0 | 689 | * seconds to wait before call is forwarded. |
michael@0 | 690 | */ |
michael@0 | 691 | readonly attribute unsigned short timeSeconds; |
michael@0 | 692 | |
michael@0 | 693 | /** |
michael@0 | 694 | * Service for which the call forward is set up. It should be one of the |
michael@0 | 695 | * nsIDOMMozMobileConnection.ICC_SERVICE_CLASS_* values. |
michael@0 | 696 | */ |
michael@0 | 697 | readonly attribute unsigned short serviceClass; |
michael@0 | 698 | }; |