2013-03-06 09:53:08 +00:00
|
|
|
/* 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"
|
|
|
|
|
2014-09-26 05:00:24 +00:00
|
|
|
interface nsIVoicemailProvider;
|
|
|
|
|
|
|
|
[scriptable, uuid(6a8b0133-960d-409d-88cd-583239e45f9f)]
|
2013-03-06 09:53:08 +00:00
|
|
|
interface nsIVoicemailListener : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2014-09-26 05:00:24 +00:00
|
|
|
* Called when a voicemail status (hasMessages, messageCount, returnNumber,
|
|
|
|
* returnMessage) changed.
|
|
|
|
*/
|
|
|
|
void notifyStatusChanged(in nsIVoicemailProvider provider);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when a voicemail info (number, displayName) changed.
|
2013-03-06 09:53:08 +00:00
|
|
|
*/
|
2014-09-26 05:00:24 +00:00
|
|
|
void notifyInfoChanged(in nsIVoicemailProvider provider);
|
2013-03-06 09:53:08 +00:00
|
|
|
};
|
|
|
|
|
2014-09-26 05:00:24 +00:00
|
|
|
%{C++
|
|
|
|
#define NS_VOICEMAIL_SERVICE_CID \
|
|
|
|
{ 0xcdd8fd72, 0x7d55, 0x496b, \
|
|
|
|
{ 0xab, 0x1d, 0x74, 0x9f, 0xbc, 0x44, 0x56, 0x32 } }
|
|
|
|
#define NS_VOICEMAIL_SERVICE_CONTRACTID \
|
|
|
|
"@mozilla.org/voicemail/voicemailservice;1"
|
|
|
|
%}
|
|
|
|
|
2013-03-06 09:53:08 +00:00
|
|
|
/**
|
|
|
|
* XPCOM component (in the content process) that provides the voicemail
|
|
|
|
* information.
|
|
|
|
*/
|
2014-09-26 05:00:24 +00:00
|
|
|
[scriptable, uuid(8ffd16c7-a614-4c4a-81f0-2a95e807152d)]
|
2014-09-26 05:00:23 +00:00
|
|
|
interface nsIVoicemailService : nsISupports
|
2013-03-06 09:53:08 +00:00
|
|
|
{
|
2014-09-26 05:00:24 +00:00
|
|
|
readonly attribute unsigned long numItems;
|
|
|
|
|
|
|
|
nsIVoicemailProvider getItemByServiceId(in unsigned long serviceId);
|
|
|
|
|
|
|
|
nsIVoicemailProvider getDefaultItem();
|
2013-10-24 08:14:50 +00:00
|
|
|
|
2013-03-06 09:53:08 +00:00
|
|
|
/**
|
2014-09-26 05:00:24 +00:00
|
|
|
* Called when any one who is interested in receiving unsolicited messages.
|
|
|
|
*/
|
|
|
|
void registerListener(in nsIVoicemailListener listener);
|
|
|
|
void unregisterListener(in nsIVoicemailListener listener);
|
|
|
|
};
|
|
|
|
|
2014-09-26 05:00:25 +00:00
|
|
|
%{C++
|
|
|
|
template<typename T> struct already_AddRefed;
|
|
|
|
|
|
|
|
already_AddRefed<nsIVoicemailService>
|
|
|
|
NS_CreateVoicemailService();
|
|
|
|
%}
|
|
|
|
|
2014-09-26 05:00:24 +00:00
|
|
|
[scriptable, uuid(a0bc19a2-3216-4f3f-89d3-8976a48cb829)]
|
|
|
|
interface nsIVoicemailProvider : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute unsigned long serviceId;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Voicemail center number. When changed, |notifyInfoChanged| of registered
|
|
|
|
* nsIVoicemailListener instances are called.
|
|
|
|
*
|
|
|
|
* Default: null
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 31.102 subclause 4.2.63 "EFmwis (Message Waiting Indication Status)"
|
|
|
|
* @see 3GPP TS 51.011 subclause 10.3.45 "EFmwis (Message Waiting Indication Status)"
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Voicemail center display name. When changed, |notifyInfoChanged| of
|
|
|
|
* registered nsIVoicemailListener instances are called.
|
|
|
|
*
|
|
|
|
* Default: null
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 31.102 subclause 4.2.63 "EFmwis (Message Waiting Indication Status)"
|
|
|
|
* @see 3GPP TS 51.011 subclause 10.3.45 "EFmwis (Message Waiting Indication Status)"
|
2013-03-06 09:53:08 +00:00
|
|
|
*/
|
2014-09-26 05:00:24 +00:00
|
|
|
readonly attribute DOMString displayName;
|
2013-03-06 09:53:08 +00:00
|
|
|
|
2014-09-26 05:00:24 +00:00
|
|
|
/**
|
|
|
|
* Whether or not there are messages waiting in the voicemail box. When
|
|
|
|
* changed, |notifyStatusChanged| of registered nsIVoicemailListener instances
|
|
|
|
* are called.
|
|
|
|
*
|
|
|
|
* Default: false
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 23.038 chapter 4 "SMS Data Coding Scheme"
|
|
|
|
* @see 3GPP TS 23.040 subclause 9.2.3.24.2 "Special SMS Message Indication"
|
|
|
|
*/
|
|
|
|
readonly attribute boolean hasMessages;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When #hasMessages is true, #messageCount should be a positive number for
|
|
|
|
* the messages waiting, or -1 if the exact number is not available. When
|
|
|
|
* changed, |notifyStatusChanged| of registered nsIVoicemailListener instances
|
|
|
|
* are called.
|
|
|
|
*
|
|
|
|
* Default: 0
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 23.040 subclause 9.2.3.24.2 "Special SMS Message Indication"
|
|
|
|
*/
|
|
|
|
readonly attribute long messageCount;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A Return Call Message indicates to the MS to inform the user that a call
|
|
|
|
* (e.g. a telephone call) can be established to the address specified within
|
|
|
|
* the #returnNumber. The #returnMessage (if present) gives displayable
|
|
|
|
* information (e.g. the number of waiting voice messages).
|
|
|
|
*
|
|
|
|
* When #hasMessages is true this may contain a non-null string as the phone
|
|
|
|
* number of a Return Call Message. When changed, |notifyStatusChanged| of
|
|
|
|
* registered nsIVoicemailListener instances are called.
|
|
|
|
*
|
|
|
|
* Default: null
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 23.040 subclause 9.2.3.9 "TPProtocolIdentifier (TPPID)"
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString returnNumber;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When #hasMessages is true this may contain a non-null string as the
|
|
|
|
* notification message of a Return Call Message. When changed,
|
|
|
|
* |notifyStatusChanged| of registered nsIVoicemailListener instances are
|
|
|
|
* called.
|
|
|
|
*
|
|
|
|
* Default: null
|
|
|
|
*
|
|
|
|
* @see 3GPP TS 23.040 subclause 9.2.3.9 "TPProtocolIdentifier (TPPID)"
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString returnMessage;
|
2013-03-06 09:53:08 +00:00
|
|
|
};
|