WebAPI/WebMobileConnection: Difference between revisions

Line 7: Line 7:
   interface MobileConnection : EventTarget
   interface MobileConnection : EventTarget
   {
   {
     attribute bool   connected;
     /**
     attribute bool   roaming;
    * Indicates whether the device is connected to a mobile network.
     attribute string operator;
    */
     attribute string type
    readonly attribute bool connected;
     attribute float  signalstrength;
      
 
    /**
    * Indicates whether the connection is going through a foreign operator
    * (roaming) or not.
    */
    readonly attribute bool roaming;
      
    /**
    * Operator name.
    */
    readonly attribute string operator;
      
    /**
    * Type of connection.
    *
    * Possible values: 'gprs', 'edge', 'umts', 'hsdpa', 'evdo0', 'evdoa', 'evdob', etc.
    */
    readonly attribute string type;
   
    /**
    * Signal strength as defined by 3GPP TS 27.007 specification, section 8.5.
    *
    * Possible values:
    *  0      -113 dBm or less
    *  1      -111 dBm
    *  2...30  -109 ... -53 dBm
    *  31      -51 dBm or greater
    *  null    if no signal strength (or signal) is available.
    */
     readonly attribute short signalstrength;
   
    /**
    * Signal strength expressed as number of "bars".
    *
    * Possible values: 0 (no signal) to 5 (full signal).
    */
    readonly attribute short bars;
   
    /**
    * The 'connectionchange' event is notified whenever one of the 'connected',
    * 'roaming', 'operator', 'type' attributes change, since typically many or
    * all of them change together.
    */
     attribute EventListener onconnectionchange;
     attribute EventListener onconnectionchange;
   
    /**
    * The 'signalstrengthchange' event is notified whenever the signal strength
    * changes value. The 'bars' attribute is updated accordingly.
    */
     attribute EventListener onsignalstrengthchange;
     attribute EventListener onsignalstrengthchange;
   }
   };
canmove, Confirmed users
725

edits