Bug 707883 - Move RadioManager from dom/telephony to dom/system/b2g and then make the worker component the only stuff in dom/telephony. The idea is that the RadioManager is a generic component that manages several workers implemented in various dom/* directories. r=bent

--HG--
rename : dom/telephony/worker-component/Makefile.in => dom/system/b2g/Makefile.in
rename : dom/telephony/RadioManager.cpp => dom/system/b2g/RadioManager.cpp
rename : dom/telephony/RadioManager.h => dom/system/b2g/RadioManager.h
rename : dom/telephony/worker-component/nsIRadioInterface.idl => dom/telephony/nsIRadioInterface.idl
rename : dom/telephony/worker-component/nsITelephonyWorker.idl => dom/telephony/nsITelephonyWorker.idl
rename : dom/telephony/worker-component/nsTelephonyWorker.js => dom/telephony/nsTelephonyWorker.js
rename : dom/telephony/worker-component/nsTelephonyWorker.manifest => dom/telephony/nsTelephonyWorker.manifest
rename : dom/telephony/worker-component/ril_consts.js => dom/telephony/ril_consts.js
rename : dom/telephony/worker-component/ril_worker.js => dom/telephony/ril_worker.js
This commit is contained in:
Blake Kaplan 2011-12-06 14:10:51 +08:00
parent a663961f32
commit 79ed79c31c
15 changed files with 44 additions and 38 deletions

View File

@ -138,7 +138,6 @@
@BINPATH@/components/dom_base.xpt
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_telephony.xpt
@BINPATH@/components/dom_telephony_worker.xpt
#endif
@BINPATH@/components/dom_battery.xpt
@BINPATH@/components/dom_canvas.xpt

View File

@ -70,7 +70,6 @@ components/pluginGlue.js
components/sidebar.xpt
#ifdef MOZ_B2G_RIL
components/dom_telephony.xpt
components/dom_telephony_worker.xpt
#endif
components/WeaveCrypto.js
components/WeaveCrypto.manifest
@ -1142,7 +1141,6 @@ xpicleanup@BIN_SUFFIX@
components/dom_base.xpt
#ifdef MOZ_B2G_RIL
components/dom_telephony.xpt
components/dom_telephony_worker.xpt
#endif
components/dom_canvas.xpt
components/dom_core.xpt

View File

@ -61,6 +61,10 @@ ifneq (,$(filter android,$(MOZ_WIDGET_TOOLKIT)))
DIRS = android
endif
ifdef MOZ_B2G_RIL #{
DIRS += b2g
endif #}
CPPSRCS = \
nsDeviceMotion.cpp \
$(NULL)

View File

@ -1,4 +1,3 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
@ -12,14 +11,15 @@
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org Code.
# The Original Code is Telephony.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# The Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Turner <bent.mozilla@gmail.com> (Original Author)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -35,28 +35,27 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_COMPONENTS = \
nsTelephonyWorker.manifest \
nsTelephonyWorker.js \
MODULE = dom
LIBRARY_NAME = domsystemb2g_s
LIBXUL_LIBRARY = 1
FORCE_STATIC_LIB = 1
include $(topsrcdir)/dom/dom-config.mk
CPPSRCS = \
RadioManager.cpp \
$(NULL)
EXTRA_JS_MODULES = \
ril_consts.js \
ril_worker.js \
$(NULL)
XPIDL_MODULE = dom_telephony_worker
XPIDLSRCS = \
nsITelephonyWorker.idl \
nsIRadioInterface.idl \
LOCAL_INCLUDES = \
-I$(topsrcdir)/dom/base \
-I$(topsrcdir)/content/events/src \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -227,9 +227,7 @@ RadioManager::Init()
// The telephony worker component is a hack that gives us a global object for
// our own functions and makes creating the worker possible.
nsCOMPtr<nsITelephonyWorker> worker(do_CreateInstance(kTelephonyWorkerCID));
if (!worker) {
return NS_ERROR_FAILURE;
}
NS_ENSURE_TRUE(worker, NS_ERROR_FAILURE);
jsval workerval;
rv = worker->GetWorker(&workerval);

View File

@ -42,6 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = dom
LIBRARY_NAME = domtelephony_s
XPIDL_MODULE = dom_telephony
LIBXUL_LIBRARY = 1
@ -49,24 +50,23 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/dom/dom-config.mk
CPPSRCS = \
RadioManager.cpp \
$(NULL)
LOCAL_INCLUDES = \
-I$(topsrcdir)/dom/base \
-I$(topsrcdir)/content/events/src \
$(NULL)
XPIDLSRCS = \
mozIDOMTelephony.idl \
nsITelephonyWorker.idl \
nsIRadioInterface.idl \
$(NULL)
EXTRA_COMPONENTS = \
Telephony.manifest \
Telephony.js \
nsTelephonyWorker.manifest \
nsTelephonyWorker.js \
$(NULL)
DIRS += worker-component
EXTRA_JS_MODULES = \
ril_consts.js \
ril_worker.js \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -146,6 +146,10 @@ LOCAL_INCLUDES += \
$(NULL)
endif
ifdef MOZ_B2G_RIL #{
SHARED_LIBRARY_LIBS += $(DEPTH)/dom/system/b2g/$(LIB_PREFIX)domsystemb2g_s.$(LIB_SUFFIX)
endif #}
ifdef MOZ_VORBIS
SHARED_LIBRARY_LIBS += \
$(DEPTH)/media/libvorbis/lib/$(LIB_PREFIX)vorbis.$(LIB_SUFFIX) \
@ -290,4 +294,9 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \
-I$(topsrcdir)/content/svg/content/src \
$(NULL)
ifdef MOZ_B2G_RIL #{
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/b2g
endif #}
DEFINES += -D_IMPL_NS_LAYOUT

View File

@ -153,7 +153,6 @@
@BINPATH@/components/dom_base.xpt
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_telephony.xpt
@BINPATH@/components/dom_telephony_worker.xpt
#endif
@BINPATH@/components/dom_battery.xpt
@BINPATH@/components/dom_canvas.xpt