dom/voicemail/nsIDOMMozVoicemailStatus.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/voicemail/nsIDOMMozVoicemailStatus.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=40: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#include "nsISupports.idl"
    1.11 +
    1.12 +[scriptable, uuid(efd352af-9eee-48dc-8e92-4d4fdbc89ecb)]
    1.13 +interface nsIDOMMozVoicemailStatus : nsISupports
    1.14 +{
    1.15 +  readonly attribute unsigned long serviceId;
    1.16 +
    1.17 +  /**
    1.18 +   * Whether or not there are messages waiting in the voicemail box
    1.19 +   */
    1.20 +  readonly attribute boolean hasMessages;
    1.21 +
    1.22 +  /**
    1.23 +   * The total message count. Some voicemail indicators will only specify that
    1.24 +   * messages are waiting, but not the actual number. In that case, the value
    1.25 +   * of messageCount will be -1, indicating the unknown message count.
    1.26 +   *
    1.27 +   * Logic for a voicemail notification might look something like:
    1.28 +   * if (status.hasMessages) {
    1.29 +   *   // show new voicemail notification
    1.30 +   *   if (status.messageCount > 0) {
    1.31 +   *     // add a label for the message count
    1.32 +   *   }
    1.33 +   * } else {
    1.34 +   *   // hide the voicemail notification
    1.35 +   * }
    1.36 +   */
    1.37 +  readonly attribute long messageCount;
    1.38 +
    1.39 +  /**
    1.40 +   * Return call number received for this voicemail status, or null if one
    1.41 +   * wasn't provided.
    1.42 +   */
    1.43 +  readonly attribute DOMString returnNumber;
    1.44 +
    1.45 +  /**
    1.46 +   * Displayable return call message received for this voicemail status, or null
    1.47 +   * if one wasn't provided.
    1.48 +   */
    1.49 +  readonly attribute DOMString returnMessage;
    1.50 +};

mercurial