23
edits
Marshall law (talk | contribs) (→Status) |
Marshall law (talk | contribs) |
||
| Line 21: | Line 21: | ||
*/ | */ | ||
readonly attribute string cardState; | readonly attribute string cardState; | ||
/** | /** | ||
* | * Information about the voice connection. | ||
*/ | */ | ||
readonly attribute | readonly attribute MobileConnectionInfo voice; | ||
/** | /** | ||
* | * Information about the data connection. | ||
*/ | */ | ||
readonly attribute | readonly attribute MobileConnectionInfo data; | ||
/** | /** | ||
* | * The 'cardstatechange' event is notified when the 'cardState' attribute | ||
* | * changes value. | ||
*/ | */ | ||
attribute EventListener oncardstatechange; | |||
/** | /** | ||
* | * The 'voicechange' event is notified whenever the voice connection object | ||
* changes. | |||
*/ | */ | ||
attribute EventListener onvoicechange; | |||
/** | /** | ||
* | * The 'datachange' event is notified whenever the data connection object | ||
* changes values. | |||
* | |||
*/ | */ | ||
attribute EventListener ondatachange; | |||
/** | /** | ||
| Line 73: | Line 60: | ||
*/ | */ | ||
DOMRequest getNetworks(); | DOMRequest getNetworks(); | ||
/** | /** | ||
| Line 104: | Line 72: | ||
* e.g. {lockType: "pin", enabled: true}. | * e.g. {lockType: "pin", enabled: true}. | ||
*/ | */ | ||
DOMRequest getCardLock( | DOMRequest getCardLock(DOMString lockType); | ||
/** | /** | ||
* Unlock a card lock. | * Unlock a card lock. | ||
| Line 129: | Line 97: | ||
* newPin: "..."}); | * newPin: "..."}); | ||
* | * | ||
* @return a | * @return a DOMRequest. | ||
* The request's result will be an object containing | * The request's result will be an object containing | ||
* information about the unlock operation. | * information about the unlock operation. | ||
| Line 150: | Line 118: | ||
* } | * } | ||
*/ | */ | ||
DOMRequest unlockCardLock( | DOMRequest unlockCardLock(Object info); | ||
/** | /** | ||
* Modify the state of a card lock. | * Modify the state of a card lock. | ||
| Line 176: | Line 144: | ||
* newPin: "..."}); | * newPin: "..."}); | ||
* | * | ||
* @return a | * @return a DOMRequest. | ||
* The request's result will be an object containing | * The request's result will be an object containing | ||
* information about the operation. | * information about the operation. | ||
| Line 197: | Line 165: | ||
* } | * } | ||
*/ | */ | ||
DOMRequest setCardLock( | DOMRequest setCardLock(Object info); | ||
}; | |||
interface MobileConnectionInfo | |||
{ | |||
/** | |||
* Indicates whether the device is connected to a mobile network. | |||
*/ | |||
readonly attribute bool connected; | |||
/** | |||
* Indicates whether only emergency calls are possible. | |||
* | |||
* This flag is only relevant to voice connections and when 'connected' is | |||
* false. | |||
*/ | |||
readonly attribute bool emergencyCallsOnly; | |||
/** | |||
* Indicates whether the connection is going through a foreign operator | |||
* (roaming) or not. | |||
*/ | |||
readonly attribute bool roaming; | |||
/** | |||
* Network operator | |||
*/ | |||
readonly attribute DOMString operator; | |||
/** | |||
* Type of connection. | |||
* | |||
* Possible values: 'gsm', 'cdma', gprs', 'edge', 'umts', 'hsdpa', 'evdo0', | |||
* 'evdoa', 'evdob', etc. | |||
*/ | |||
readonly attribute DOMString type; | |||
/** | |||
* Signal strength in dBm, or null if no service is available. | |||
*/ | |||
readonly attribute int signalStrength; | |||
/** | |||
* Signal strength, represented linearly as a number between 0 (weakest | |||
* signal) and 100 (full signal). | |||
*/ | |||
readonly attribute int relSignalStrength; | |||
}; | |||
interface MobileOperatorInfo | |||
{ | |||
/** | |||
* Short name of the network operator | |||
*/ | |||
readonly attribute DOMString shortName; | |||
/** | |||
* Long name of the network operator | |||
*/ | |||
readonly attribute DOMString longName; | |||
/** | |||
* Mobile Country Code (MCC) of the network operator | |||
*/ | |||
readonly attribute unsigned short mcc; | |||
/** | |||
* Mobile Network Code (MNC) of the network operator | |||
*/ | |||
readonly attribute unsigned short mnc; | |||
/** | |||
* State of this network operator. | |||
* | |||
* Possible values: 'available', 'connected', 'forbidden', or null (unknown) | |||
*/ | |||
readonly attribute DOMString state; | |||
}; | }; | ||
edits