Bug 734145 - B2G RIL: Support USSD codes. Part 1: IDLs. r=philikon

This commit is contained in:
Fernando Jiménez 2012-06-09 17:07:18 -04:00
parent 0edf60727a
commit 1f2748f899
4 changed files with 58 additions and 23 deletions

View File

@ -18,6 +18,7 @@ XPIDLSRCS = \
nsIDOMConnection.idl \
nsIDOMMobileConnection.idl \
nsIMobileConnectionProvider.idl \
nsIDOMUSSDReceivedEvent.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -8,7 +8,7 @@ interface nsIDOMEventListener;
interface nsIDOMDOMRequest;
interface nsIDOMMozMobileConnectionInfo;
[scriptable, builtinclass, uuid(962298cd-3443-423e-9e47-f22e24ad850b)]
[scriptable, builtinclass, uuid(e7309c47-9a2e-4e12-84ab-f8f39214eaba)]
interface nsIDOMMozMobileConnection : nsIDOMEventTarget
{
/**
@ -40,24 +40,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
*/
nsIDOMDOMRequest getNetworks();
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
attribute nsIDOMEventListener oncardstatechange;
/**
* The 'voicechange' event is notified whenever the voice connection object
* changes.
*/
attribute nsIDOMEventListener onvoicechange;
/**
* The 'datachange' event is notified whenever the data connection object
* changes values.
*/
attribute nsIDOMEventListener ondatachange;
/**
* Find out about the status of an ICC lock (e.g. the PIN lock).
*
@ -65,7 +47,7 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
* Identifies the lock type, e.g. "pin" for the PIN lock.
*
* @return a DOM Request.
* The request's result will be an object containing
* The request's result will be an object containing
* information about the specified lock's status,
* e.g. {lockType: "pin", enabled: true}.
*/
@ -95,7 +77,7 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
* newPin: "..."});
*
* @return a nsIDOMDOMRequest.
* The request's result will be an object containing
* The request's result will be an object containing
* information about the unlock operation.
*
* Examples:
@ -142,7 +124,7 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
* newPin: "..."});
*
* @return a nsIDOMDOMRequest.
* The request's result will be an object containing
* The request's result will be an object containing
* information about the operation.
*
* Examples:
@ -163,6 +145,45 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
* }
*/
nsIDOMDOMRequest setCardLock(in jsval info);
/**
* Send a USSD message.
*
* The network reply will be reported via onussdreceived event.
*
* The 'success' event for the request means the USSD message has been sent
* successfully.
*/
nsIDOMDOMRequest sendUSSD(in DOMString ussd);
/**
* Cancel the current USSD session if one exists.
*/
nsIDOMDOMRequest cancelUSSD();
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
attribute nsIDOMEventListener oncardstatechange;
/**
* The 'voicechange' event is notified whenever the voice connection object
* changes.
*/
attribute nsIDOMEventListener onvoicechange;
/**
* The 'datachange' event is notified whenever the data connection object
* changes values.
*/
attribute nsIDOMEventListener ondatachange;
/**
* The 'ussdreceived' event is notified whenever a new USSD message is
* received.
*/
attribute nsIDOMEventListener onussdreceived;
};
[scriptable, uuid(f3bb0611-5e4a-46f1-a8f5-cf592b37596e)]

View File

@ -0,0 +1,11 @@
/* 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 "nsIDOMEvent.idl"
[scriptable, uuid(b9eb511b-511c-4fc7-b84b-6c947ecfca08)]
interface nsIDOMUSSDReceivedEvent : nsIDOMEvent
{
readonly attribute DOMString message;
};

View File

@ -12,7 +12,7 @@ interface nsIDOMWindow;
* XPCOM component (in the content process) that provides the mobile
* network information.
*/
[scriptable, uuid(93202514-9ae9-482e-95bc-9c6ed62aea99)]
[scriptable, uuid(fb3fac34-c1c2-45a9-ad18-a7af0f7997c9)]
interface nsIMobileConnectionProvider : nsISupports
{
readonly attribute DOMString cardState;
@ -23,4 +23,6 @@ interface nsIMobileConnectionProvider : nsISupports
nsIDOMDOMRequest getCardLock(in nsIDOMWindow window, in DOMString lockType);
nsIDOMDOMRequest unlockCardLock(in nsIDOMWindow window, in jsval info);
nsIDOMDOMRequest setCardLock(in nsIDOMWindow window, in jsval info);
nsIDOMDOMRequest sendUSSD(in nsIDOMWindow window, in DOMString ussd);
nsIDOMDOMRequest cancelUSSD(in nsIDOMWindow window);
};