Bug 958782 - 1/3: B2G SMS - Move MozMobileMessage to WebIDL. XPIDL & WebIDL changes. f=Ms2ger,r=khuey

--HG--
rename : dom/webidl/MobileMessageManager.webidl => dom/webidl/MozMobileMessageManager.webidl
This commit is contained in:
Vicamo Yang 2014-06-25 11:57:13 +08:00
Родитель 862225544b
Коммит dd22105985
8 изменённых файлов: 131 добавлений и 119 удалений

Просмотреть файл

@ -842,6 +842,10 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::MobileConnectionInfo',
},
'MozMobileMessageManager': {
'nativeType': 'mozilla::dom::MobileMessageManager',
},
'MozMobileNetworkInfo': {
'nativeType': 'mozilla::dom::MobileNetworkInfo',
},
@ -1964,11 +1968,13 @@ addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=Tru
addExternalIface('MozFrameRequestCallback', nativeType='nsIFrameRequestCallback',
notflattened=True)
addExternalIface('MozIccInfo', headerFile='nsIDOMIccInfo.h')
addExternalIface('MozMobileMessageManager', headerFile='nsIDOMMobileMessageManager.h')
addExternalIface('MozMmsMessage')
addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
notflattened=True)
addExternalIface('MozRDFResource', nativeType='nsIRDFResource', notflattened=True)
addExternalIface('MozSmsFilter', headerFile='nsIDOMSmsFilter.h')
addExternalIface('MozSmsMessage')
addExternalIface('MozTreeBoxObject', nativeType='nsITreeBoxObject',
notflattened=True)
addExternalIface('MozTreeColumn', nativeType='nsITreeColumn',

Просмотреть файл

@ -5,7 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
'nsIDOMMobileMessageManager.idl',
'nsIDOMMozMmsMessage.idl',
'nsIDOMMozMobileMessageThread.idl',
'nsIDOMMozSmsMessage.idl',

Просмотреть файл

@ -1,81 +0,0 @@
/* 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 "nsIDOMEventTarget.idl"
interface nsIDOMEventListener;
interface nsIDOMMozSmsFilter;
interface nsIDOMMozSmsSegmentInfo;
interface nsIDOMDOMCursor;
interface nsIDOMDOMRequest;
interface nsIDOMBlob;
[scriptable, builtinclass, uuid(8ec8247d-3f5f-41af-9c72-9dc857e3be81)]
interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget
{
nsIDOMDOMRequest getSegmentInfoForText(in DOMString text);
/**
* Function to send SMS.
*
* @param number
* Either a DOMString (only one number) or an array of numbers.
* @param message
* The text message to be sent.
* @param sendParameters
* An SmsSendParameters object.
* @param return
* A DOMRequest object indicating the sending result if one number
* has been passed; an array of DOMRequest objects otherwise.
*/
[implicit_jscontext, optional_argc]
jsval send(in jsval number, in DOMString message,
[optional] in jsval sendParameters);
/**
* Function to send MMS.
*
* @param parameters
* An MmsParameters object.
* @param sendParameters
* An MmsSendParameters object.
* @param return
* A DOMRequest object indicating the sending result.
*/
[implicit_jscontext, optional_argc]
nsIDOMDOMRequest sendMMS(in jsval parameters,
[optional] in jsval sendParameters);
[binaryname(GetMessageMoz)]
nsIDOMDOMRequest getMessage(in long id);
// The parameter can be either a message id or a nsIDOMMoz{Mms,Sms}Message.
[implicit_jscontext]
nsIDOMDOMRequest delete(in jsval param);
// Iterates through nsIDOMMoz{Mms,Sms}Message.
nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
nsIDOMDOMRequest markMessageRead(in long id, in boolean value,
[optional] in boolean aSendReadReport);
// Iterates through nsIDOMMozMobileMessageThread.
nsIDOMDOMCursor getThreads();
nsIDOMDOMRequest retrieveMMS(in long id);
[optional_argc]
nsIDOMDOMRequest getSmscAddress([optional] in unsigned long serviceId);
[implicit_jscontext] attribute jsval onreceived;
[implicit_jscontext] attribute jsval onretrieving;
[implicit_jscontext] attribute jsval onsending;
[implicit_jscontext] attribute jsval onsent;
[implicit_jscontext] attribute jsval onfailed;
[implicit_jscontext] attribute jsval ondeliverysuccess;
[implicit_jscontext] attribute jsval ondeliveryerror;
[implicit_jscontext] attribute jsval onreadsuccess;
[implicit_jscontext] attribute jsval onreaderror;
};

Просмотреть файл

@ -1,24 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*/
dictionary MmsParameters {
sequence<DOMString> receivers;
DOMString? subject = null;
DOMString? smil = null;
sequence<MmsAttachment> attachments;
};
// If we start using MmsParameters here, remove it from DummyBinding.
dictionary SmsSendParameters {
unsigned long serviceId; // The ID of the RIL service which needs to be
// specified under the multi-sim scenario.
};
dictionary MmsSendParameters {
unsigned long serviceId; // The ID of the RIL service which needs to be
// specified under the multi-sim scenario.
};

Просмотреть файл

@ -4,13 +4,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// If this is changed, change the MmsMessage.h structure as well.
dictionary MmsAttachment {
DOMString? id = null;
DOMString? location = null;
Blob? content = null;
};
dictionary MmsDeliveryInfo {
DOMString? receiver = null;
DOMString? deliveryStatus = null;
@ -20,5 +13,3 @@ dictionary MmsDeliveryInfo {
DOMTimeStamp readTimestamp = 0; // 0 if not available (e.g.,
// |delivery| = "received" or not yet read).
};
// If we start using MmsParameters here, remove it from DummyBinding.

Просмотреть файл

@ -0,0 +1,123 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*/
interface MozMmsMessage;
interface MozSmsFilter;
interface MozSmsMessage;
dictionary MmsAttachment {
DOMString? id = null;
DOMString? location = null;
Blob? content = null;
};
dictionary MmsParameters {
sequence<DOMString> receivers;
DOMString? subject = null;
DOMString? smil = null;
sequence<MmsAttachment> attachments;
};
dictionary SmsSendParameters {
unsigned long serviceId; // The ID of the RIL service which needs to be
// specified under the multi-sim scenario.
};
dictionary MmsSendParameters {
unsigned long serviceId; // The ID of the RIL service which needs to be
// specified under the multi-sim scenario.
};
[Pref="dom.sms.enabled"]
interface MozMobileMessageManager : EventTarget
{
[Throws]
DOMRequest getSegmentInfoForText(DOMString text);
/**
* Send SMS.
*
* @param number
* Either a DOMString (only one number) or an array of numbers.
* @param text
* The text message to be sent.
* @param sendParameters
* A SmsSendParameters object.
*
* @return
* A DOMRequest object indicating the sending result if one number
* has been passed; an array of DOMRequest objects otherwise.
*/
[Throws]
DOMRequest send(DOMString number,
DOMString text,
optional SmsSendParameters sendParameters);
[Throws]
sequence<DOMRequest> send(sequence<DOMString> numbers,
DOMString text,
optional SmsSendParameters sendParameters);
/**
* Send MMS.
*
* @param parameters
* A MmsParameters object.
* @param sendParameters
* A MmsSendParameters object.
*
* @return
* A DOMRequest object indicating the sending result.
*/
[Throws]
DOMRequest sendMMS(optional MmsParameters parameters,
optional MmsSendParameters sendParameters);
[Throws]
DOMRequest getMessage(long id);
// The parameter can be either a message id, or a Moz{Mms,Sms}Message, or an
// array of Moz{Mms,Sms}Message objects.
[Throws]
DOMRequest delete(long id);
[Throws]
DOMRequest delete(MozSmsMessage message);
[Throws]
DOMRequest delete(MozMmsMessage message);
[Throws]
DOMRequest delete(sequence<(long or MozSmsMessage or MozMmsMessage)> params);
// Iterates through Moz{Mms,Sms}Message.
[Throws]
DOMCursor getMessages(optional MozSmsFilter? filter = null,
optional boolean reverse = false);
[Throws]
DOMRequest markMessageRead(long id,
boolean read,
optional boolean sendReadReport = false);
// Iterates through nsIDOMMozMobileMessageThread.
[Throws]
DOMCursor getThreads();
[Throws]
DOMRequest retrieveMMS(long id);
[Throws]
DOMRequest retrieveMMS(MozMmsMessage message);
[Throws]
DOMRequest getSmscAddress(optional unsigned long serviceId);
attribute EventHandler onreceived;
attribute EventHandler onretrieving;
attribute EventHandler onsending;
attribute EventHandler onsent;
attribute EventHandler onfailed;
attribute EventHandler ondeliverysuccess;
attribute EventHandler ondeliveryerror;
attribute EventHandler onreadsuccess;
attribute EventHandler onreaderror;
};

Просмотреть файл

@ -245,8 +245,6 @@ partial interface Navigator {
boolean mozIsLocallyAvailable(DOMString uri, boolean whenOffline);
};
// nsIDOMMozNavigatorMobileMessage
interface MozMobileMessageManager;
partial interface Navigator {
[Func="Navigator::HasMobileMessageSupport"]
readonly attribute MozMobileMessageManager? mozMobileMessage;

Просмотреть файл

@ -250,11 +250,11 @@ WEBIDL_FILES = [
'MessagePortList.webidl',
'MimeType.webidl',
'MimeTypeArray.webidl',
'MobileMessageManager.webidl',
'MouseEvent.webidl',
'MouseScrollEvent.webidl',
'MozActivity.webidl',
'MozMmsMessage.webidl',
'MozMobileMessageManager.webidl',
'MozNamedAttrMap.webidl',
'MozPowerManager.webidl',
'MozTimeManager.webidl',