Bug 1010356 - Part 1: interface changes to support neighboring cell info. r=hsinyi

This commit is contained in:
Jessica Jong 2014-06-24 23:13:00 +02:00
Родитель da88119cc7
Коммит a66746c9ed
3 изменённых файлов: 72 добавлений и 1 удалений

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

@ -9,6 +9,7 @@ XPIDL_SOURCES += [
'nsIMobileConnectionInfo.idl',
'nsIMobileConnectionProvider.idl',
'nsIMobileNetworkInfo.idl',
'nsINeighboringCellInfo.idl',
]
XPIDL_MODULE = 'dom_mobileconnection'

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

@ -0,0 +1,64 @@
/* 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(909f5972-c74e-44dd-b72a-7ddb62aae617)]
interface nsINeighboringCellIdsCallback : nsISupports
{
/**
* result is an array of nsINeighboringCellInfo.
*/
void notifyGetNeighboringCellIds(in jsval result);
/**
* Callback function with error message.
*/
void notifyGetNeighboringCellIdsFailed(in DOMString error);
};
[scriptable, uuid(87dc222e-abb3-4342-95bf-626aa19fa20e)]
interface nsINeighboringCellInfo: nsISupports
{
/**
* Type of radio technology.
*
* Possible values: 'gsm', 'gprs', 'edge', 'umts', 'hsdpa', 'hsupa', 'hspa',
* 'hspa+' or null (unknown).
*/
readonly attribute DOMString networkType;
/**
* Mobile Location Area Code (LAC) for GSM networks.
*
* Possible ranges from 0x0000 to 0xffff.
* -1 if the LAC is unknown.
*/
readonly attribute long gsmLocationAreaCode;
/**
* Mobile Cell ID for GSM networks.
*
* Possible ranges from 0x00000000 to 0xffffffff.
* -1 if the cell id is unknown.
*/
readonly attribute long long gsmCellId;
/**
* Primary Scrambling Code (PSC) for WCDMA networks.
*
* Possible ranges from 0x0000 to 0x01ff.
* -1 if the psc is unknown.
*/
readonly attribute long wcdmaPsc;
/**
* For GSM networks, signalStrength is the received rssi, ranging from 0 to 31.
* For WCDMA networks, signalStrength is the CPICH Received Signal Code Power,
* ranging from -120 to -25.
*
* 99 if signalStrength is unknown.
*/
readonly attribute long signalStrength;
};

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

@ -8,6 +8,7 @@
interface nsIDOMMozIccInfo;
interface nsIMobileConnectionInfo;
interface nsIMobileMessageCallback;
interface nsINeighboringCellIdsCallback;
[scriptable, uuid(6e0f45b8-410e-11e3-8c8e-b715b2cd0128)]
interface nsIRilNetworkInterface : nsINetworkInterface
@ -55,7 +56,7 @@ interface nsIRilSendWorkerMessageCallback : nsISupports
boolean handleResponse(in jsval response);
};
[scriptable, uuid(181d460e-220e-4274-8ba4-43f122eb518d)]
[scriptable, uuid(31ba65b6-05c7-4bc8-abdc-f1a219811fb4)]
interface nsIRadioInterface : nsISupports
{
readonly attribute nsIRilContext rilContext;
@ -85,6 +86,11 @@ interface nsIRadioInterface : nsISupports
[optional] in nsIRilSendWorkerMessageCallback callback);
void getSmscAddress(in nsIMobileMessageCallback request);
/**
* Cell Info functionality.
*/
void getNeighboringCellIds(in nsINeighboringCellIdsCallback callback);
};
[scriptable, uuid(d035c32e-b491-11e3-9f9d-c716fab88bd6)]