1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=40: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 [JSImplementation="@mozilla.org/voicemailstatus;1",
8 Pref="dom.voicemail.enabled"]
10 interface MozVoicemailStatus
12 readonly attribute unsigned long serviceId;
15 * Whether or not there are messages waiting in the voicemail box
17 readonly attribute boolean hasMessages;
20 * The total message count. Some voicemail indicators will only specify that
21 * messages are waiting, but not the actual number. In that case, the value
22 * of messageCount will be -1, indicating the unknown message count.
24 * Logic for a voicemail notification might look something like:
25 * if (status.hasMessages) {
26 * // show new voicemail notification
27 * if (status.messageCount > 0) {
28 * // add a label for the message count
31 * // hide the voicemail notification
34 readonly attribute long messageCount;
37 * Return call number received for this voicemail status, or null if one
40 readonly attribute DOMString? returnNumber;
43 * Displayable return call message received for this voicemail status, or null
44 * if one wasn't provided.
46 readonly attribute DOMString? returnMessage;