From 92164abd05ca8a4160a32c3bc6b7db5d9efb6c4a Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 18 Nov 2014 10:06:52 +0800 Subject: [PATCH] Bug 1052846 - Part 1: Use enums for MobileNetworkType in nsIMobileConnectionService.idl (idl). r=hsinyi --- .../interfaces/nsIMobileConnectionService.idl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl index 9c9efaf23c3..1fc16940497 100644 --- a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl +++ b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl @@ -235,7 +235,7 @@ already_AddRefed NS_CreateMobileConnectionService(); %} -[scriptable, uuid(5250a0ba-19a2-4e5b-a5ee-1e69ba2897a9)] +[scriptable, uuid(99e43353-5fc4-497e-88a2-5fa6862ee64c)] interface nsIMobileConnection : nsISupports { /* @@ -335,6 +335,15 @@ interface nsIMobileConnection : nsISupports const long CDMA_ROAMING_PREFERENCE_AFFILIATED = 1; const long CDMA_ROAMING_PREFERENCE_ANY = 2; + /** + * Supported network type. + */ + const long MOBILE_NETWORK_TYPE_GSM = 0; + const long MOBILE_NETWORK_TYPE_WCDMA = 1; + const long MOBILE_NETWORK_TYPE_CDMA = 2; + const long MOBILE_NETWORK_TYPE_EVDO = 3; + const long MOBILE_NETWORK_TYPE_LTE = 4; + readonly attribute unsigned long serviceId; /** @@ -386,10 +395,9 @@ interface nsIMobileConnection : nsISupports /** * The network types supported by this radio. * - * @return an array of DOMString - * Possible values: 'gsm', 'wcdma', 'cdma', 'evdo', 'lte'. + * @return an array of nsIMobileConnection.MOBILE_NETWORK_TYPE_* values. */ - void getSupportedNetworkTypes([array, size_is(length)] out wstring types, + void getSupportedNetworkTypes([array, size_is(length)] out long types, [retval] out unsigned long length); /**