Skip to content

Commit

Permalink
Bug 898445 - Part 1-2: Move MozMobileNetworkInfo to webidl. r=hsinyi,…
Browse files Browse the repository at this point in the history
…smaug
  • Loading branch information
EdgarChen committed Apr 24, 2014
1 parent 65d2475 commit afbd861
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 31 deletions.
1 change: 1 addition & 0 deletions dom/mobileconnection/interfaces/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ XPIDL_SOURCES += [
'nsIDOMMobileConnection.idl',
'nsIMobileCellInfo.idl',
'nsIMobileConnectionProvider.idl',
'nsIMobileNetworkInfo.idl',
]

XPIDL_MODULE = 'dom_mobileconnection'
31 changes: 0 additions & 31 deletions dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
Original file line number Diff line number Diff line change
Expand Up @@ -540,37 +540,6 @@ interface nsIDOMMozMobileConnectionInfo : nsISupports

};

[scriptable, uuid(40018fc7-4c42-47b6-8de6-3591a9c622bc)]
interface nsIDOMMozMobileNetworkInfo: nsISupports
{
/**
* Short name of the network operator
*/
readonly attribute DOMString shortName;

/**
* Long name of the network operator
*/
readonly attribute DOMString longName;

/**
* Mobile Country Code (MCC) of the network operator
*/
readonly attribute DOMString mcc;

/**
* Mobile Network Code (MNC) of the network operator
*/
readonly attribute DOMString mnc;

/**
* State of this network operator.
*
* Possible values: 'available', 'connected', 'forbidden', or null (unknown)
*/
readonly attribute DOMString state;
};

[scriptable, uuid(d1b35ad8-99aa-47cc-ab49-2e72b00e39df)]
interface nsIDOMMozMobileCFInfo : nsISupports
{
Expand Down
36 changes: 36 additions & 0 deletions dom/mobileconnection/interfaces/nsIMobileNetworkInfo.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* 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"

[scriptable, uuid(d7e1364c-61a0-4cf1-bae3-a960e87064e1)]
interface nsIMobileNetworkInfo: nsISupports
{
/**
* Short name of the network operator.
*/
readonly attribute DOMString shortName;

/**
* Long name of the network operator.
*/
readonly attribute DOMString longName;

/**
* Mobile Country Code (MCC) of the network operator.
*/
readonly attribute DOMString mcc;

/**
* Mobile Network Code (MNC) of the network operator.
*/
readonly attribute DOMString mnc;

/**
* State of this network operator.
*
* Possible values: 'available', 'connected', 'forbidden', or null (unknown).
*/
readonly attribute DOMString state;
};
36 changes: 36 additions & 0 deletions dom/webidl/MozMobileNetworkInfo.webidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* 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/. */

enum MobileNetworkState {"available", "connected", "forbidden"};

[Pref="dom.mobileconnection.enabled",
ChromeConstructor(DOMString shortName, DOMString longName, DOMString mcc,
DOMString mnc, DOMString state)]
interface MozMobileNetworkInfo
{
/**
* Short name of the network operator.
*/
readonly attribute DOMString? shortName;

/**
* Long name of the network operator.
*/
readonly attribute DOMString? longName;

/**
* Mobile Country Code (MCC) of the network operator.
*/
readonly attribute DOMString? mcc;

/**
* Mobile Network Code (MNC) of the network operator.
*/
readonly attribute DOMString? mnc;

/**
* State of this network operator.
*/
readonly attribute MobileNetworkState? state;
};
1 change: 1 addition & 0 deletions dom/webidl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ if CONFIG['MOZ_B2G_RIL']:
'MozIccManager.webidl',
'MozMobileCellInfo.webidl',
'MozMobileConnectionArray.webidl',
'MozMobileNetworkInfo.webidl',
'MozVoicemail.webidl',
'MozVoicemailEvent.webidl',
]
Expand Down

0 comments on commit afbd861

Please sign in to comment.