Bug 814629 - Part 1: MozMobileConnectionArray webidl. f=hsinyi r=khuey
authorJessica Jong <jjong@mozilla.com>
Wed, 13 Nov 2013 16:50:11 +0800
changeset 155098 eb0765ea6e45ccf0f9e97610312a9bddb8aa2dbe
parent 155097 d052965caf4b132d4fae7f2e5d3936cd5355e77f
child 155099 54d9f3f445d1c917c228bc8fca69cc1efdf8638f
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerskhuey
bugs814629
milestone28.0a1
Bug 814629 - Part 1: MozMobileConnectionArray webidl. f=hsinyi r=khuey
dom/bindings/Bindings.conf
dom/webidl/MozMobileConnectionArray.webidl
dom/webidl/Navigator.webidl
dom/webidl/moz.build
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -784,16 +784,21 @@ DOMInterfaces = {
 {
     'workers': True,
 }],
 
 'MozCellBroadcast': {
     'nativeType': 'mozilla::dom::CellBroadcast',
 },
 
+'MozMobileConnectionArray': {
+    'nativeType': 'mozilla::dom::network::MobileConnectionArray',
+    'resultNotAddRefed': [ 'item' ]
+},
+
 'MozNamedAttrMap': {
     'nativeType': 'nsDOMAttributeMap',
 },
 
 'MozPowerManager': {
     'nativeType': 'mozilla::dom::PowerManager',
 },
 
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozMobileConnectionArray.webidl
@@ -0,0 +1,12 @@
+/* -*- 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 MozMobileConnection;
+
+interface MozMobileConnectionArray {
+  getter MozMobileConnection? item(unsigned long index);
+  readonly attribute unsigned long length;
+};
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -250,21 +250,19 @@ callback systemMessageCallback = void (o
 partial interface Navigator {
   [Throws, Pref="dom.sysmsg.enabled"]
   void    mozSetMessageHandler (DOMString type, systemMessageCallback? callback);
   [Throws, Pref="dom.sysmsg.enabled"]
   boolean mozHasPendingMessage (DOMString type);
 };
 
 #ifdef MOZ_B2G_RIL
-// nsIMozNavigatorMobileConnection
-interface MozMobileConnection;
 partial interface Navigator {
   [Throws, Func="Navigator::HasMobileConnectionSupport"]
-  readonly attribute MozMobileConnection mozMobileConnection;
+  readonly attribute MozMobileConnectionArray mozMobileConnections;
 };
 
 partial interface Navigator {
   [Throws, Func="Navigator::HasCellBroadcastSupport"]
   readonly attribute MozCellBroadcast mozCellBroadcast;
 };
 
 partial interface Navigator {
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -510,16 +510,17 @@ if CONFIG['MOZ_B2G_BT']:
 if CONFIG['MOZ_B2G_RIL']:
     WEBIDL_FILES += [
         'CFStateChangeEvent.webidl',
         'DataErrorEvent.webidl',
         'IccCardLockError.webidl',
         'MozCellBroadcast.webidl',
         'MozCellBroadcastEvent.webidl',
         'MozEmergencyCbModeEvent.webidl',
+        'MozMobileConnectionArray.webidl',
         'MozOtaStatusEvent.webidl',
         'MozVoicemail.webidl',
         'MozVoicemailEvent.webidl',
         'USSDReceivedEvent.webidl',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     WEBIDL_FILES += [