Talk:WebAPI/WebTelephony: Difference between revisions

 
(2 intermediate revisions by the same user not shown)
Line 37: Line 37:
== philikon's thoughts ==
== philikon's thoughts ==


* IMHO <code>navigator.telephony.dial("numbergoeshere");</code> is nicer than <code>new TelephonyCall("numbergoeshere");</code>
* IMHO <code>navigator.telephony.dial("numbergoeshere");</code> is nicer than <code>new TelephonyCall("numbergoeshere");</code>, because a constructor with side-effects like that just feels icky.
* We have a bunch of telephony-related functionality that's not reflected yet:
* We have a bunch of telephony-related functionality that's not reflected yet:
** controlling and reading radio power
** controlling and reading radio power
Line 48: Line 48:


   interface Telephony {
   interface Telephony {
    // ... all the stuff from the main proposal
     void power(bool on);
     void power(bool on);
     Some thoughts on this:
      
     TelephonyCall dial(String number);
     TelephonyCall dial(String number);
      
      
     EventListener onpowerchange
    const String RADIOSTATE_UNAVAILABLE = "unavailable";
    const String RADIOSTATE_OFF        = "off";
    const String RADIOSTATE_READY      = "ready";
   
    const String CARDSTATE_NOT_READY      = "unavailable";
    const String CARDSTATE_ABSENT        = "absent";
    const String CARDSTATE_PIN_REQUIRED  = "pin_required";
    const String CARDSTATE_PUK_REQUIRED  = "puk_required";
    const String CARDSTATE_NETWORK_LOCKED = "network_locked";
    const String CARDSTATE_NOT_READY      = "not_ready";
    const String CARDSTATE_READY          = "ready";
   
    readonly String radioState;
    readonly String cardState;
   
     EventListener onradiostatechange
    EventListener oniccstatechange
     EventListener onsignalstrengthchange
     EventListener onsignalstrengthchange
     EventListener onoperatorchange
     EventListener onoperatorchange
  }
 
  interface TelephonyCall {
    // ... all the stuff from the main proposal
   
    const String READYSTATE_DIALING  = "dialing";
    const String READYSTATE_CALLING  = "calling";
    const String READYSTATE_INCOMING  = "incoming";
    const String READYSTATE_CONNECTED = "connected";
    const String READYSTATE_CLOSED    = "closed";
    const String READYSTATE_BUSY      = "busy";
   }
   }
canmove, Confirmed users
725

edits