зеркало из https://github.com/mozilla/gecko-dev.git
Bug 833229 - 3.a/4: interfance changes. r=echen, r=smaug
This commit is contained in:
Родитель
bdae0f605d
Коммит
19a3ae7a10
|
@ -31,6 +31,7 @@ include protocol PSpeechSynthesis;
|
|||
include protocol PStorage;
|
||||
include protocol PTelephony;
|
||||
include protocol PTestShell;
|
||||
include protocol PVoicemail;
|
||||
include protocol PJavaScript;
|
||||
include protocol PRemoteSpellcheckEngine;
|
||||
include DOMTypes;
|
||||
|
@ -338,6 +339,7 @@ intr protocol PContent
|
|||
manages PStorage;
|
||||
manages PTelephony;
|
||||
manages PTestShell;
|
||||
manages PVoicemail;
|
||||
manages PJavaScript;
|
||||
manages PRemoteSpellcheckEngine;
|
||||
|
||||
|
@ -539,6 +541,8 @@ parent:
|
|||
|
||||
PTelephony();
|
||||
|
||||
PVoicemail();
|
||||
|
||||
PBluetooth();
|
||||
|
||||
PFMRadio();
|
||||
|
|
|
@ -23,14 +23,6 @@ interface nsIRilNetworkInterface : nsINetworkInterface
|
|||
readonly attribute long mmsPort; // -1 if not set.
|
||||
};
|
||||
|
||||
[scriptable, uuid(c0c5cb9f-6372-4b5a-b74c-baacc2da5e4f)]
|
||||
interface nsIVoicemailInfo : nsISupports
|
||||
{
|
||||
readonly attribute DOMString number;
|
||||
|
||||
readonly attribute DOMString displayName;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0226a2c1-a3b9-416a-92cb-c89e4dad4be0)]
|
||||
interface nsIRilContext : nsISupports
|
||||
{
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set sw=2 ts=8 et ft=cpp : */
|
||||
/* 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 protocol PContent;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace voicemail {
|
||||
|
||||
sync protocol PVoicemail
|
||||
{
|
||||
manager PContent;
|
||||
|
||||
child:
|
||||
NotifyInfoChanged(uint32_t aServiceId,
|
||||
nsString aNumber,
|
||||
nsString aDisplayName);
|
||||
|
||||
NotifyStatusChanged(uint32_t aServiceId,
|
||||
bool aHasMessages,
|
||||
int32_t aMessageCount,
|
||||
nsString aNumber,
|
||||
nsString aDisplayName);
|
||||
|
||||
parent:
|
||||
/**
|
||||
* Send when child no longer needs to use PVoicemail.
|
||||
*/
|
||||
__delete__();
|
||||
|
||||
sync GetAttributes(uint32_t aServiceId)
|
||||
returns (nsString aNumber,
|
||||
nsString aDisplayName,
|
||||
bool aHasMessages,
|
||||
int32_t aMessageCount,
|
||||
nsString aReturnNumber,
|
||||
nsString aReturnMessage);
|
||||
};
|
||||
|
||||
} // namespace voicemail
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
|
@ -4,36 +4,127 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(214b0963-da48-4859-a56c-f065a90e0403)]
|
||||
interface nsIVoicemailProvider;
|
||||
|
||||
[scriptable, uuid(6a8b0133-960d-409d-88cd-583239e45f9f)]
|
||||
interface nsIVoicemailListener : nsISupports
|
||||
{
|
||||
/**
|
||||
* Called when a voicemail notification has been received by the network.
|
||||
*
|
||||
* @param status
|
||||
* The new voicemail status
|
||||
* Called when a voicemail status (hasMessages, messageCount, returnNumber,
|
||||
* returnMessage) changed.
|
||||
*/
|
||||
void notifyStatusChanged(in jsval status);
|
||||
void notifyStatusChanged(in nsIVoicemailProvider provider);
|
||||
|
||||
/**
|
||||
* Called when a voicemail info (number, displayName) changed.
|
||||
*/
|
||||
void notifyInfoChanged(in nsIVoicemailProvider provider);
|
||||
};
|
||||
|
||||
%{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"
|
||||
%}
|
||||
|
||||
/**
|
||||
* XPCOM component (in the content process) that provides the voicemail
|
||||
* information.
|
||||
*/
|
||||
[scriptable, uuid(1b42b00b-8f86-4fb5-b936-99e82802340c)]
|
||||
[scriptable, uuid(8ffd16c7-a614-4c4a-81f0-2a95e807152d)]
|
||||
interface nsIVoicemailService : nsISupports
|
||||
{
|
||||
readonly attribute unsigned long voicemailDefaultServiceId;
|
||||
readonly attribute unsigned long numItems;
|
||||
|
||||
nsIVoicemailProvider getItemByServiceId(in unsigned long serviceId);
|
||||
|
||||
nsIVoicemailProvider getDefaultItem();
|
||||
|
||||
/**
|
||||
* Called when a content process registers receiving unsolicited messages from
|
||||
* RadioInterfaceLayer in the chrome process. Only a content process that has
|
||||
* the 'voicemail' permission is allowed to register.
|
||||
* Called when any one who is interested in receiving unsolicited messages.
|
||||
*/
|
||||
void registerVoicemailMsg(in nsIVoicemailListener listener);
|
||||
void unregisterVoicemailMsg(in nsIVoicemailListener listener);
|
||||
|
||||
jsval getVoicemailStatus(in unsigned long clientId);
|
||||
DOMString getVoicemailNumber(in unsigned long clientId);
|
||||
DOMString getVoicemailDisplayName(in unsigned long clientId);
|
||||
void registerListener(in nsIVoicemailListener listener);
|
||||
void unregisterListener(in nsIVoicemailListener listener);
|
||||
};
|
||||
|
||||
[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)"
|
||||
*/
|
||||
readonly attribute DOMString displayName;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче