зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1063304 - 1/3: rename MobileConnectionGonkService.js to MobileConnectionService.js. r=echen
--HG-- rename : dom/mobileconnection/gonk/MobileConnectionGonkService.js => dom/mobileconnection/gonk/MobileConnectionService.js rename : dom/mobileconnection/gonk/MobileConnectionGonkService.manifest => dom/mobileconnection/gonk/MobileConnectionService.manifest rename : dom/mobileconnection/interfaces/nsIMobileConnectionGonkService.idl => dom/mobileconnection/gonk/nsIGonkMobileConnectionService.idl
This commit is contained in:
Родитель
16d7fa28b0
Коммит
cec2df0efb
|
@ -438,6 +438,8 @@
|
|||
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
@BINPATH@/components/MmsService.js
|
||||
@BINPATH@/components/MmsService.manifest
|
||||
@BINPATH@/components/MobileConnectionService.js
|
||||
@BINPATH@/components/MobileConnectionService.manifest
|
||||
@BINPATH@/components/MobileMessageDatabaseService.js
|
||||
@BINPATH@/components/MobileMessageDatabaseService.manifest
|
||||
@BINPATH@/components/RadioInterfaceLayer.js
|
||||
|
@ -445,8 +447,6 @@
|
|||
@BINPATH@/components/RILContentHelper.js
|
||||
@BINPATH@/components/TelephonyService.js
|
||||
@BINPATH@/components/TelephonyService.manifest
|
||||
@BINPATH@/components/MobileConnectionGonkService.js
|
||||
@BINPATH@/components/MobileConnectionGonkService.manifest
|
||||
#endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL
|
||||
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace dom {
|
|||
* The modules hold the reference of MobileConnectionCallback in OOP mode and
|
||||
* non-OOP mode are different.
|
||||
* - OOP mode: MobileConnectionRequestChild
|
||||
* - non-OOP mode: MobileConnectionGonkService
|
||||
* - non-OOP mode: MobileConnectionService
|
||||
* The reference should be released after Notify*Success/Error is called.
|
||||
*/
|
||||
class MobileConnectionCallback MOZ_FINAL : public nsIMobileConnectionCallback
|
||||
|
|
|
@ -14,10 +14,10 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
var RIL = {};
|
||||
Cu.import("resource://gre/modules/ril_consts.js", RIL);
|
||||
|
||||
const MOBILECONNECTIONGONKSERVICE_CONTRACTID =
|
||||
"@mozilla.org/mobileconnection/mobileconnectiongonkservice;1";
|
||||
const GONK_MOBILECONNECTIONSERVICE_CONTRACTID =
|
||||
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1";
|
||||
|
||||
const MOBILECONNECTIONGONKSERVICE_CID =
|
||||
const GONK_MOBILECONNECTIONSERVICE_CID =
|
||||
Components.ID("{05e20430-fe65-4984-8df9-a6a504b24a91}");
|
||||
const MOBILENETWORKINFO_CID =
|
||||
Components.ID("{a6c8416c-09b4-46d1-bf29-6520d677d085}");
|
||||
|
@ -44,7 +44,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gRadioInterfaceLayer",
|
|||
|
||||
let DEBUG = RIL.DEBUG_RIL;
|
||||
function debug(s) {
|
||||
dump("MobileConnectionGonkService: " + s + "\n");
|
||||
dump("MobileConnectionService: " + s + "\n");
|
||||
}
|
||||
|
||||
function MobileNetworkInfo() {
|
||||
|
@ -293,7 +293,7 @@ MobileConnectionProvider.prototype = {
|
|||
*/
|
||||
_checkRoamingBetweenOperators: function(aNetworkInfo) {
|
||||
// TODO: Bug 864489 - B2G RIL: use ipdl as IPC in MozIccManager
|
||||
// Should get iccInfo from IccGonkProvider.
|
||||
// Should get iccInfo from GonkIccProvider.
|
||||
let iccInfo = this._radioInterface.rilContext.iccInfo;
|
||||
let operator = aNetworkInfo.network;
|
||||
let state = aNetworkInfo.state;
|
||||
|
@ -950,7 +950,7 @@ MobileConnectionProvider.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
function MobileConnectionGonkService() {
|
||||
function MobileConnectionService() {
|
||||
this._providers = [];
|
||||
|
||||
let numClients = gRadioInterfaceLayer.numRadioInterfaces;
|
||||
|
@ -966,15 +966,15 @@ function MobileConnectionGonkService() {
|
|||
|
||||
debug("init complete");
|
||||
}
|
||||
MobileConnectionGonkService.prototype = {
|
||||
classID: MOBILECONNECTIONGONKSERVICE_CID,
|
||||
classInfo: XPCOMUtils.generateCI({classID: MOBILECONNECTIONGONKSERVICE_CID,
|
||||
contractID: MOBILECONNECTIONGONKSERVICE_CONTRACTID,
|
||||
classDescription: "MobileConnectionGonkService",
|
||||
interfaces: [Ci.nsIMobileConnectionGonkService,
|
||||
MobileConnectionService.prototype = {
|
||||
classID: GONK_MOBILECONNECTIONSERVICE_CID,
|
||||
classInfo: XPCOMUtils.generateCI({classID: GONK_MOBILECONNECTIONSERVICE_CID,
|
||||
contractID: GONK_MOBILECONNECTIONSERVICE_CONTRACTID,
|
||||
classDescription: "MobileConnectionService",
|
||||
interfaces: [Ci.nsIGonkMobileConnectionService,
|
||||
Ci.nsIMobileConnectionService],
|
||||
flags: Ci.nsIClassInfo.SINGLETON}),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionGonkService,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGonkMobileConnectionService,
|
||||
Ci.nsIMobileConnectionService,
|
||||
Ci.nsIObserver]),
|
||||
|
||||
|
@ -1286,7 +1286,7 @@ MobileConnectionGonkService.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* nsIMobileConnectionGonkService interface.
|
||||
* nsIGonkMobileConnectionService interface.
|
||||
*/
|
||||
notifyVoiceInfoChanged: function(aClientId, aVoiceInfo) {
|
||||
if (DEBUG) {
|
||||
|
@ -1560,4 +1560,4 @@ MobileConnectionGonkService.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MobileConnectionGonkService]);
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MobileConnectionService]);
|
|
@ -1,2 +1,2 @@
|
|||
component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionGonkService.js
|
||||
contract @mozilla.org/mobileconnection/mobileconnectiongonkservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91}
|
||||
component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionService.js
|
||||
contract @mozilla.org/mobileconnection/gonkmobileconnectionservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91}
|
|
@ -5,12 +5,12 @@
|
|||
#include "nsIMobileConnectionService.idl"
|
||||
|
||||
%{C++
|
||||
#define NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/mobileconnection/mobileconnectiongonkservice;1"
|
||||
#define GONK_MOBILECONNECTION_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(c5baceda-247a-4018-855d-ad5b00f2e4e2)]
|
||||
interface nsIMobileConnectionGonkService : nsIMobileConnectionService
|
||||
[scriptable, uuid(e54fa0a4-d357-48ef-9a1e-ffc9705b44b1)]
|
||||
interface nsIGonkMobileConnectionService : nsIMobileConnectionService
|
||||
{
|
||||
void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo);
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsICellInfo.idl',
|
||||
'nsIMobileCellInfo.idl',
|
||||
'nsIMobileConnectionInfo.idl',
|
||||
'nsIMobileConnectionService.idl',
|
||||
'nsIMobileNetworkInfo.idl',
|
||||
'nsINeighboringCellInfo.idl',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
|
||||
XPIDL_SOURCES += [
|
||||
'nsIMobileConnectionGonkService.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'dom_mobileconnection'
|
|
@ -4,8 +4,6 @@
|
|||
# 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/.
|
||||
|
||||
DIRS += ['interfaces']
|
||||
|
||||
MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
|
@ -25,6 +23,15 @@ EXPORTS.mozilla.dom.mobileconnection += [
|
|||
'ipc/MobileConnectionParent.h',
|
||||
]
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'interfaces/nsICellInfo.idl',
|
||||
'interfaces/nsIMobileCellInfo.idl',
|
||||
'interfaces/nsIMobileConnectionInfo.idl',
|
||||
'interfaces/nsIMobileConnectionService.idl',
|
||||
'interfaces/nsIMobileNetworkInfo.idl',
|
||||
'interfaces/nsINeighboringCellInfo.idl',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'DOMMMIError.cpp',
|
||||
'ipc/MobileConnectionChild.cpp',
|
||||
|
@ -45,9 +52,12 @@ IPDL_SOURCES += [
|
|||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
|
||||
XPIDL_SOURCES += [
|
||||
'gonk/nsIGonkMobileConnectionService.idl',
|
||||
]
|
||||
EXTRA_COMPONENTS += [
|
||||
'gonk/MobileConnectionGonkService.js',
|
||||
'gonk/MobileConnectionGonkService.manifest',
|
||||
'gonk/MobileConnectionService.js',
|
||||
'gonk/MobileConnectionService.manifest',
|
||||
]
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -55,3 +65,5 @@ FAIL_ON_WARNINGS = True
|
|||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
XPIDL_MODULE = 'dom_mobileconnection'
|
||||
|
|
|
@ -201,7 +201,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gTelephonyService",
|
|||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gMobileConnectionService",
|
||||
"@mozilla.org/mobileconnection/mobileconnectionservice;1",
|
||||
"nsIMobileConnectionGonkService");
|
||||
"nsIGonkMobileConnectionService");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "WAP", function() {
|
||||
let wap = {};
|
||||
|
@ -3002,8 +3002,8 @@ RadioInterface.prototype = {
|
|||
this.clientId,
|
||||
message.iccid ? message : null);
|
||||
|
||||
// In bug 864489, icc related code will be move to IccGonkProvider, we may
|
||||
// need a better way to notify icc change to MobileConnectionGonkProvider.
|
||||
// In bug 864489, icc related code will be move to gonk IccProvider, we may
|
||||
// need a better way to notify icc change to MobileConnectionService.
|
||||
gMobileConnectionService.notifyIccChanged(this.clientId,
|
||||
message.iccid || null);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ using mozilla::system::nsVolumeService;
|
|||
#include "mozilla/dom/mobileconnection/MobileConnectionIPCService.h"
|
||||
using mozilla::dom::mobileconnection::MobileConnectionIPCService;
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsIMobileConnectionGonkService.h"
|
||||
#include "nsIGonkMobileConnectionService.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -950,7 +950,7 @@ nsIMobileConnectionServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|||
service = MobileConnectionIPCService::GetSingleton();
|
||||
} else {
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
service = do_CreateInstance(NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID);
|
||||
service = do_CreateInstance(GONK_MOBILECONNECTION_SERVICE_CONTRACTID);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче