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 file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 enum MobileConnectionState {"notSearching", "searching", "denied", "registered"};
6 enum MobileConnectionType {"gsm", "gprs", "edge", "umts", "hsdpa", "hsupa",
7 "hspa", "hspa+", "is95a", "is95b", "1xrtt", "evdo0",
8 "evdoa", "evdob", "ehrpd", "lte"};
10 [Pref="dom.mobileconnection.enabled"]
11 interface MozMobileConnectionInfo
14 * State of the connection.
16 readonly attribute MobileConnectionState? state;
19 * Indicates whether the connection is ready.
21 * Note: The meaning of "connection ready" for data and voice are different.
22 * - Data: the "default" data connection is established or not.
23 * - Voice: voice is registered to network or not.
25 readonly attribute boolean connected;
28 * Indicates whether only emergency calls are possible.
30 * This flag is only relevant to voice connections and when 'connected' is
33 readonly attribute boolean emergencyCallsOnly;
36 * Indicates whether the connection is going through a foreign operator
39 readonly attribute boolean roaming;
42 * Network operator information.
44 readonly attribute MozMobileNetworkInfo? network;
49 readonly attribute MobileConnectionType? type;
52 * Signal strength in dBm, or null if no service is available.
54 readonly attribute long? signalStrength;
57 * Signal strength, represented linearly as a number between 0 (weakest
58 * signal) and 100 (full signal).
60 readonly attribute unsigned short? relSignalStrength;
63 * Cell location information.
65 readonly attribute MozMobileCellInfo? cell;