Bug 814634 - part1 - WebAPI - WebVoicemail API: support multiple sim cards. r=khuey, r=gene.lian
authorHsin-Yi Tsai <htsai@mozilla.com>
Sun, 27 Oct 2013 20:46:46 +0800
changeset 153754 32206ae7721b6d626542fed1eaf9699bf78cf5d6
parent 153753 984cc39d660cc82f246917470360ddf59691ecde
child 153755 f1f17c5ae015d6a4ad7953284570ceb4ecd12eae
push id25605
push usercbook@mozilla.com
push dateWed, 06 Nov 2013 12:11:28 +0000
treeherdermozilla-central@7ba5fb33e59f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, gene.lian
bugs814634
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 814634 - part1 - WebAPI - WebVoicemail API: support multiple sim cards. r=khuey, r=gene.lian
dom/voicemail/nsIDOMMozVoicemailStatus.idl
dom/webidl/MozVoicemail.webidl
--- a/dom/voicemail/nsIDOMMozVoicemailStatus.idl
+++ b/dom/voicemail/nsIDOMMozVoicemailStatus.idl
@@ -1,33 +1,30 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=40: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(8c58859a-e006-466a-ad76-b188ba0918ab)]
+[scriptable, uuid(efd352af-9eee-48dc-8e92-4d4fdbc89ecb)]
 interface nsIDOMMozVoicemailStatus : nsISupports
 {
-  /**
-   * There are voicemail messages waiting, but the count is unknown.
-   */
-  const long MESSAGE_COUNT_UNKNOWN = -1;
+  readonly attribute unsigned long serviceId;
 
   /**
    * Whether or not there are messages waiting in the voicemail box
    */
   readonly attribute boolean hasMessages;
 
   /**
    * The total message count. Some voicemail indicators will only specify that
    * messages are waiting, but not the actual number. In that case, the value
-   * of messageCount will be MESSAGE_COUNT_UNKNOWN (-1).
+   * of messageCount will be -1, indicating the unknown message count.
    *
    * Logic for a voicemail notification might look something like:
    * if (status.hasMessages) {
    *   // show new voicemail notification
    *   if (status.messageCount > 0) {
    *     // add a label for the message count
    *   }
    * } else {
--- a/dom/webidl/MozVoicemail.webidl
+++ b/dom/webidl/MozVoicemail.webidl
@@ -6,31 +6,33 @@
 
 // nsIDOMMozVoicemailStatus
 interface MozVoicemailStatus;
 
 [Pref="dom.voicemail.enabled"]
 interface MozVoicemail : EventTarget
 {
   /**
-   * The current voicemail status, or null when the status is unknown
+   * The current voicemail status of a specified service, or null when the
+   * status is unknown.
    */
-  [GetterThrows]
-  readonly attribute MozVoicemailStatus? status;
+  [Throws]
+  MozVoicemailStatus getStatus(optional unsigned long serviceId);
 
   /**
-   * The voicemail box dialing number, or null if one wasn't found
+   * The voicemail box dialing number of a specified service, or null if one
+   * wasn't found.
    */
-  [GetterThrows]
-  readonly attribute DOMString? number;
+  [Throws]
+  DOMString getNumber(optional unsigned long serviceId);
 
   /**
-   * The display name of the voicemail box dialing number, or null if one
-   * wasn't found
+   * The display name of the voicemail box dialing number of a specified service,
+   * or null if one wasn't found.
    */
-  [GetterThrows]
-  readonly attribute DOMString? displayName;
+  [Throws]
+  DOMString getDisplayName(optional unsigned long serviceId);
 
   /**
-   * The current voicemail status has changed
+   * The current voicemail status has changed.
    */
   attribute EventHandler onstatuschanged;
 };