From 2d6a0e991e1f520c859b4a0a107add0462298a97 Mon Sep 17 00:00:00 2001 From: Sergey Yanovich Date: Fri, 28 Dec 2007 00:48:48 +0200 Subject: [PATCH] [storage] Migrate to mozbuild (bug #114) --- Makefile.in | 2 +- abstract/Makefile.in | 2 +- abstract/storage/Makefile.am | 32 ------------- {xpcom => abstract/storage}/Makefile.in | 18 ++++++-- app/test/unit/Makefile.in | 1 + base/test/Makefile.in | 2 - makefiles.sh | 6 +++ storage/Makefile.am | 68 ---------------------------- {abstract => storage}/Makefile.in | 2 +- {abstract => storage/account}/Makefile.in | 4 +- {base => storage/account}/test/Makefile.in | 21 +++++---- storage/{ => account/test}/aaAccountTest.cpp | 42 ++++++++--------- {base/test => storage/base}/Makefile.in | 43 +++++++++++++----- storage/{ => base}/aaFilter.cpp | 3 +- storage/{ => base}/aaFilter.h | 2 + storage/{ => base}/aaGuard.h | 0 storage/{ => base}/aaIncomeRow.cpp | 6 +-- storage/{ => base}/aaIncomeRow.h | 2 + storage/{ => base}/aaLoadBalance.cpp | 19 ++++---- storage/{ => base}/aaLoadBalance.h | 0 storage/{ => base}/aaLoadEntity.cpp | 9 ++-- storage/{ => base}/aaLoadEntity.h | 4 +- storage/{ => base}/aaLoadFactList.cpp | 15 +++--- storage/{ => base}/aaLoadFactList.h | 0 storage/{ => base}/aaLoadFlow.cpp | 15 +++--- storage/{ => base}/aaLoadFlow.h | 0 storage/{ => base}/aaLoadFlowChart.cpp | 13 +++--- storage/{ => base}/aaLoadFlowChart.h | 0 storage/{ => base}/aaLoadFlowStates.cpp | 17 ++++--- storage/{ => base}/aaLoadFlowStates.h | 0 storage/{ => base}/aaLoadIncome.cpp | 19 ++++---- storage/{ => base}/aaLoadIncome.h | 0 storage/{ => base}/aaLoadPendingFacts.cpp | 13 +++--- storage/{ => base}/aaLoadPendingFacts.h | 0 storage/{ => base}/aaLoadQuery.cpp | 13 +++--- storage/{ => base}/aaLoadQuery.h | 2 + storage/{ => base}/aaLoadQuote.cpp | 11 ++--- storage/{ => base}/aaLoadQuote.h | 0 storage/{ => base}/aaLoadResource.cpp | 9 ++-- storage/{ => base}/aaLoadResource.h | 2 + storage/{ => base}/aaSaveDispatcher.cpp | 17 ++++--- storage/{ => base}/aaSaveDispatcher.h | 3 ++ storage/{ => base}/aaSaveEntity.cpp | 9 ++-- storage/{ => base}/aaSaveEntity.h | 2 + storage/{ => base}/aaSaveEvent.cpp | 15 +++--- storage/{ => base}/aaSaveEvent.h | 2 + storage/{ => base}/aaSaveFlow.cpp | 13 +++--- storage/{ => base}/aaSaveFlow.h | 2 + storage/{ => base}/aaSaveQuote.cpp | 11 ++--- storage/{ => base}/aaSaveQuote.h | 2 + storage/{ => base}/aaSaveResource.cpp | 9 ++-- storage/{ => base}/aaSaveResource.h | 2 + storage/{ => base}/aaSaveTransaction.cpp | 14 +++--- storage/{ => base}/aaSaveTransaction.h | 6 ++- storage/{ => base}/aaSession.cpp | 13 +++--- storage/{ => base}/aaSession.h | 2 + storage/{ => base}/aaStateFilter.cpp | 7 ++- storage/{ => base}/aaStateFilter.h | 2 + storage/{ => base}/aaStorageModule.cpp | 16 ++----- storage/{ => base}/aaStorageUtils.cpp | 0 {base => storage/base}/test/Makefile.in | 17 ++++--- storage/{ => base/test}/aaStorageTest.cpp | 38 +++++++--------- xpcom/Makefile.in | 1 + abstract/aacore.h => xpcom/aaAmountUtils.h | 14 ++---- 64 files changed, 279 insertions(+), 355 deletions(-) delete mode 100644 abstract/storage/Makefile.am copy {xpcom => abstract/storage}/Makefile.in (86%) delete mode 100644 storage/Makefile.am copy {abstract => storage}/Makefile.in (98%) copy {abstract => storage/account}/Makefile.in (98%) copy {base => storage/account}/test/Makefile.in (86%) rename storage/{ => account/test}/aaAccountTest.cpp (99%) copy {base/test => storage/base}/Makefile.in (75%) rename storage/{ => base}/aaFilter.cpp (95%) rename storage/{ => base}/aaFilter.h (98%) rename storage/{ => base}/aaGuard.h (100%) rename storage/{ => base}/aaIncomeRow.cpp (97%) rename storage/{ => base}/aaIncomeRow.h (98%) rename storage/{ => base}/aaLoadBalance.cpp (91%) rename storage/{ => base}/aaLoadBalance.h (100%) rename storage/{ => base}/aaLoadEntity.cpp (90%) rename storage/{ => base}/aaLoadEntity.h (100%) rename storage/{ => base}/aaLoadFactList.cpp (93%) rename storage/{ => base}/aaLoadFactList.h (100%) rename storage/{ => base}/aaLoadFlow.cpp (92%) rename storage/{ => base}/aaLoadFlow.h (100%) rename storage/{ => base}/aaLoadFlowChart.cpp (94%) rename storage/{ => base}/aaLoadFlowChart.h (100%) rename storage/{ => base}/aaLoadFlowStates.cpp (90%) rename storage/{ => base}/aaLoadFlowStates.h (100%) rename storage/{ => base}/aaLoadIncome.cpp (86%) rename storage/{ => base}/aaLoadIncome.h (100%) rename storage/{ => base}/aaLoadPendingFacts.cpp (92%) rename storage/{ => base}/aaLoadPendingFacts.h (100%) rename storage/{ => base}/aaLoadQuery.cpp (92%) rename storage/{ => base}/aaLoadQuery.h (98%) rename storage/{ => base}/aaLoadQuote.cpp (92%) rename storage/{ => base}/aaLoadQuote.h (100%) rename storage/{ => base}/aaLoadResource.cpp (91%) rename storage/{ => base}/aaLoadResource.h (98%) rename storage/{ => base}/aaSaveDispatcher.cpp (90%) rename storage/{ => base}/aaSaveDispatcher.h (97%) rename storage/{ => base}/aaSaveEntity.cpp (94%) rename storage/{ => base}/aaSaveEntity.h (98%) rename storage/{ => base}/aaSaveEvent.cpp (98%) rename storage/{ => base}/aaSaveEvent.h (98%) rename storage/{ => base}/aaSaveFlow.cpp (95%) rename storage/{ => base}/aaSaveFlow.h (98%) rename storage/{ => base}/aaSaveQuote.cpp (91%) rename storage/{ => base}/aaSaveQuote.h (98%) rename storage/{ => base}/aaSaveResource.cpp (94%) rename storage/{ => base}/aaSaveResource.h (98%) rename storage/{ => base}/aaSaveTransaction.cpp (98%) rename storage/{ => base}/aaSaveTransaction.h (98%) rename storage/{ => base}/aaSession.cpp (96%) rename storage/{ => base}/aaSession.h (98%) rename storage/{ => base}/aaStateFilter.cpp (95%) rename storage/{ => base}/aaStateFilter.h (98%) rename storage/{ => base}/aaStorageModule.cpp (92%) rename storage/{ => base}/aaStorageUtils.cpp (100%) copy {base => storage/base}/test/Makefile.in (91%) rename storage/{ => base/test}/aaStorageTest.cpp (97%) rename abstract/aacore.h => xpcom/aaAmountUtils.h (80%) diff --git a/Makefile.in b/Makefile.in index 688c19d..e74ebaf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -42,6 +42,6 @@ VPATH = @srcdir@ include $(topsrcdir)/config/config.mk -DIRS = xpcom abstract xpunit base app +DIRS = xpcom abstract xpunit base storage app include $(topsrcdir)/config/rules.mk diff --git a/abstract/Makefile.in b/abstract/Makefile.in index bb16f6a..e892a00 100644 --- a/abstract/Makefile.in +++ b/abstract/Makefile.in @@ -42,6 +42,6 @@ VPATH = @srcdir@ include $(topsrcdir)/config/config.mk -DIRS = xpunit base +DIRS = xpunit base storage include $(topsrcdir)/config/rules.mk diff --git a/abstract/storage/Makefile.am b/abstract/storage/Makefile.am deleted file mode 100644 index ca00c0e..0000000 --- a/abstract/storage/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Makefile.am -- Process this file with automake to produce Makefile.in -## Copyright (C) 2007 Sergey Yanovich -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -include $(top_srcdir)/config/config.mk -AM_CXXFLAGS += -I$(top_builddir)/abstract/base -AM_XPIDLFLAGS += -I$(top_srcdir)/abstract/base - -moduleincludedir = $(pkgincludedir)/storage -moduleinclude_HEADERS = \ - aaISaveQuery.h \ - aaILoadQuery.h \ - aaIFilter.h \ - aaIStateFilter.h \ - aaISession.h - -component_DATA = libaastorage.xpt - -CLEANFILES = $(moduleinclude_HEADERS) *.xpt diff --git a/xpcom/Makefile.in b/abstract/storage/Makefile.in similarity index 86% copy from xpcom/Makefile.in copy to abstract/storage/Makefile.in index 80eac0f..563c061 100644 --- a/xpcom/Makefile.in +++ b/abstract/storage/Makefile.in @@ -35,18 +35,30 @@ # # ***** END LICENSE BLOCK ***** -DEPTH = ../.. +DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = xpcom +MODULE = storage +XPIDL_MODULE = storage GRE_MODULE = 1 EXPORTS = \ - aaParamFactory.h \ + aaStorageUtils.h \ + aaBaseLoaders.h \ + aaAccountLoaders.h \ + aaTestConsts.h \ + $(NULL) + +XPIDLSRCS = \ + aaISaveQuery.idl \ + aaILoadQuery.idl \ + aaIFilter.idl \ + aaIStateFilter.idl \ + aaISession.idl \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/app/test/unit/Makefile.in b/app/test/unit/Makefile.in index 60330ce..e3bb2fb 100644 --- a/app/test/unit/Makefile.in +++ b/app/test/unit/Makefile.in @@ -46,5 +46,6 @@ include $(topsrcdir)/config/rules.mk libs:: @echo TESTING ABSTRACT + rm -f $(HOME)/.abstract/*default/default.sqlite touch $(DIST)/bin/.autoreg $(DIST)/bin/$(MOZ_BUILD_APP)$(BIN_SUFFIX) --test diff --git a/base/test/Makefile.in b/base/test/Makefile.in index c89b8c1..09cba84 100644 --- a/base/test/Makefile.in +++ b/base/test/Makefile.in @@ -69,6 +69,4 @@ LOCAL_INCLUDES = \ EXTRA_DSO_LDOPTS+= \ $(XPCOM_GLUE_LDOPTS) \ $(NSPR_LIBS) \ - $(MOZ_JS_LIBS) \ - ../$(LIB_PREFIX)aabase$(DLL_SUFFIX) \ $(NULL) diff --git a/makefiles.sh b/makefiles.sh index fbc01a6..af780dc 100644 --- a/makefiles.sh +++ b/makefiles.sh @@ -41,9 +41,15 @@ abstract/xpcom/Makefile abstract/abstract/Makefile abstract/abstract/xpunit/Makefile abstract/abstract/base/Makefile +abstract/abstract/storage/Makefile abstract/xpunit/Makefile abstract/base/Makefile abstract/base/test/Makefile +abstract/storage/Makefile +abstract/storage/base/Makefile +abstract/storage/base/test/Makefile +abstract/storage/account/Makefile +abstract/storage/account/test/Makefile abstract/app/Makefile abstract/app/chrome/Makefile abstract/app/test/Makefile diff --git a/storage/Makefile.am b/storage/Makefile.am deleted file mode 100644 index ba4fd19..0000000 --- a/storage/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -## Makefile.am -- Process this file with automake to produce Makefile.in -## Copyright (C) 2006,2007 Sergey Yanovich -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -include $(top_srcdir)/config/config.mk - -AM_CXXFLAGS += -I$(top_builddir)/abstract/base -AM_LDFLAGS += -L../storage/ - -MODULE_CPPSRC = \ - aaStorageUtils.cpp\ - aaSession.cpp \ - aaSaveDispatcher.cpp \ - aaFilter.cpp \ - aaStateFilter.cpp \ - aaLoadQuery.cpp \ - aaSaveEntity.cpp \ - aaLoadEntity.cpp \ - aaSaveResource.cpp \ - aaSaveFlow.cpp \ - aaLoadResource.cpp \ - aaSaveEvent.cpp \ - aaLoadFlow.cpp \ - aaLoadFlowChart.cpp \ - aaLoadFlowStates.cpp \ - aaLoadBalance.cpp \ - aaLoadPendingFacts.cpp \ - aaLoadFactList.cpp \ - aaLoadIncome.cpp \ - aaSaveQuote.cpp \ - aaLoadQuote.cpp - -ACCOUNT_CPPSRC = \ - aaIncomeRow.cpp \ - aaSaveTransaction.cpp - -if AA_ENABLE_TESTS -UNIT_TEST = libaastoraget.la libaaaccountt.la -libaastoraget_la_SOURCES = \ - $(MODULE_CPPSRC) \ - aaStorageTest.cpp -libaastoraget_la_LIBADD = -lxpcom -lxpcomglue_s -libaaaccountt_la_SOURCES = \ - $(ACCOUNT_CPPSRC) \ - aaAccountTest.cpp -libaaaccountt_la_LIBADD = -lxpcom -lxpcomglue_s -endif - -component_LTLIBRARIES = $(UNIT_TEST) libaastorage.la - -libaastorage_la_SOURCES = \ - $(MODULE_CPPSRC) \ - $(ACCOUNT_CPPSRC) \ - aaStorageModule.cpp -libaastorage_la_LIBADD = -lxpcom -lxpcomglue_s diff --git a/abstract/Makefile.in b/storage/Makefile.in similarity index 98% copy from abstract/Makefile.in copy to storage/Makefile.in index bb16f6a..e3b3071 100644 --- a/abstract/Makefile.in +++ b/storage/Makefile.in @@ -42,6 +42,6 @@ VPATH = @srcdir@ include $(topsrcdir)/config/config.mk -DIRS = xpunit base +DIRS = base account include $(topsrcdir)/config/rules.mk diff --git a/abstract/Makefile.in b/storage/account/Makefile.in similarity index 98% copy from abstract/Makefile.in copy to storage/account/Makefile.in index bb16f6a..f954cc0 100644 --- a/abstract/Makefile.in +++ b/storage/account/Makefile.in @@ -35,13 +35,13 @@ # # ***** END LICENSE BLOCK ***** -DEPTH = ../.. +DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(topsrcdir)/config/config.mk -DIRS = xpunit base +DIRS = test include $(topsrcdir)/config/rules.mk diff --git a/base/test/Makefile.in b/storage/account/test/Makefile.in similarity index 86% copy from base/test/Makefile.in copy to storage/account/test/Makefile.in index c89b8c1..ebfac40 100644 --- a/base/test/Makefile.in +++ b/storage/account/test/Makefile.in @@ -35,40 +35,41 @@ # # ***** END LICENSE BLOCK ***** -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = base -LIBRARY_NAME = aabase_t -SHORT_LIBNAME = aabase_t +MODULE = storage +LIBRARY_NAME = account_t +SHORT_LIBNAME = accoun_t EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = aaBaseTest +MODULE_NAME = aaAccountTest REQUIRES = \ xpcom \ string \ - intl \ xpunit \ + base \ $(NULL) CPPSRCS = \ - aaBaseTest.cpp \ + aaAccountTest.cpp \ $(NULL) include $(topsrcdir)/config/rules.mk LOCAL_INCLUDES = \ - -I$(srcdir)/.. \ + -I$(srcdir)/../../base \ $(NULL) EXTRA_DSO_LDOPTS+= \ + ../../base/aaSession.$(OBJ_SUFFIX) \ + ../../base/aaSaveTransaction.$(OBJ_SUFFIX) \ + ../../base/aaIncomeRow.$(OBJ_SUFFIX) \ $(XPCOM_GLUE_LDOPTS) \ $(NSPR_LIBS) \ - $(MOZ_JS_LIBS) \ - ../$(LIB_PREFIX)aabase$(DLL_SUFFIX) \ $(NULL) diff --git a/storage/aaAccountTest.cpp b/storage/account/test/aaAccountTest.cpp similarity index 99% rename from storage/aaAccountTest.cpp rename to storage/account/test/aaAccountTest.cpp index 0e39a31..dc8a756 100644 --- a/storage/aaAccountTest.cpp +++ b/storage/account/test/aaAccountTest.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsIGenericFactory.h" #include "nsComponentManagerUtils.h" @@ -29,33 +29,33 @@ #include "nsIMutableArray.h" /* Unfrozen API */ -#include -#include -#include -#include +#include "mozIStorageConnection.h" +#include "nsTestUtils.h" +#include "nsITest.h" +#include "nsITestRunner.h" /* Project includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aaIResource.h" +#include "aaIEntity.h" +#include "aaIFact.h" +#include "aaIFlow.h" +#include "aaIEvent.h" +#include "aaIQuote.h" +#include "aaITransaction.h" +#include "aaIBalance.h" +#include "aaISession.h" +#include "aaBaseLoaders.h" +#include "aaAccountLoaders.h" +#include "aaIFilter.h" +#include "aaIStateFilter.h" +#include "aaILoadQuery.h" #include "aaIncomeRow.h" #include "aaSaveTransaction.h" /* XXX _acc This is a temporary hack to acquire connection * It has to be replaced with a 'chart' */ #include "aaSession.h" -#include +#include "aaTestConsts.h" #define AA_ACCOUNT_TEST_CID \ {0x9f3b3e19, 0x2f06, 0x4a75, {0xbc, 0xb8, 0xd7, 0xd3, 0x5c, 0xaf, 0x9d, 0x36}} @@ -147,7 +147,7 @@ aaAccountTest::Test(nsITestRunner *aTestRunner) return NS_OK; } -NS_IMPL_ISUPPORTS1(aaAccountTest, nsITest); +NS_IMPL_ISUPPORTS1(aaAccountTest, nsITest) /* Boilerplate - factory & module */ NS_GENERIC_FACTORY_CONSTRUCTOR(aaAccountTest) diff --git a/base/test/Makefile.in b/storage/base/Makefile.in similarity index 75% copy from base/test/Makefile.in copy to storage/base/Makefile.in index c89b8c1..3dbe4f1 100644 --- a/base/test/Makefile.in +++ b/storage/base/Makefile.in @@ -42,33 +42,52 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = base -LIBRARY_NAME = aabase_t -SHORT_LIBNAME = aabase_t +DIRS = test + +MODULE = storage +LIBRARY_NAME = storage +SHORT_LIBNAME = storage EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = aaBaseTest +MODULE_NAME = aaStorage REQUIRES = \ xpcom \ string \ - intl \ - xpunit \ + base \ $(NULL) CPPSRCS = \ - aaBaseTest.cpp \ + aaStorageUtils.cpp\ + aaSession.cpp \ + aaSaveDispatcher.cpp \ + aaFilter.cpp \ + aaStateFilter.cpp \ + aaLoadQuery.cpp \ + aaSaveEntity.cpp \ + aaLoadEntity.cpp \ + aaSaveResource.cpp \ + aaSaveFlow.cpp \ + aaLoadResource.cpp \ + aaSaveEvent.cpp \ + aaLoadFlow.cpp \ + aaLoadFlowChart.cpp \ + aaLoadFlowStates.cpp \ + aaLoadBalance.cpp \ + aaLoadPendingFacts.cpp \ + aaLoadFactList.cpp \ + aaLoadIncome.cpp \ + aaSaveQuote.cpp \ + aaLoadQuote.cpp \ + aaIncomeRow.cpp \ + aaSaveTransaction.cpp \ + aaStorageModule.cpp \ $(NULL) include $(topsrcdir)/config/rules.mk -LOCAL_INCLUDES = \ - -I$(srcdir)/.. \ - $(NULL) - EXTRA_DSO_LDOPTS+= \ $(XPCOM_GLUE_LDOPTS) \ $(NSPR_LIBS) \ $(MOZ_JS_LIBS) \ - ../$(LIB_PREFIX)aabase$(DLL_SUFFIX) \ $(NULL) diff --git a/storage/aaFilter.cpp b/storage/base/aaFilter.cpp similarity index 95% rename from storage/aaFilter.cpp rename to storage/base/aaFilter.cpp index 78b3b90..fa6717a 100644 --- a/storage/aaFilter.cpp +++ b/storage/base/aaFilter.cpp @@ -19,13 +19,12 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Project includes */ -#include #include "aaFilter.h" aaFilter::aaFilter(nsISupports *aOuter) diff --git a/storage/aaFilter.h b/storage/base/aaFilter.h similarity index 98% rename from storage/aaFilter.h rename to storage/base/aaFilter.h index cc640ad..b5c320e 100644 --- a/storage/aaFilter.h +++ b/storage/base/aaFilter.h @@ -26,6 +26,8 @@ {0x305013ce, 0xa817, 0x4035, {0x95, 0x6c, 0x8b, 0x3f, 0x8b, 0xf0, 0x2b, 0x36}} #define AA_FILTER_CONTRACT_ID "@aasii.org/storage/filter;1" +#include "aaIFilter.h" + class aaFilter : public aaIStringFilter { public: diff --git a/storage/aaGuard.h b/storage/base/aaGuard.h similarity index 100% rename from storage/aaGuard.h rename to storage/base/aaGuard.h diff --git a/storage/aaIncomeRow.cpp b/storage/base/aaIncomeRow.cpp similarity index 97% rename from storage/aaIncomeRow.cpp rename to storage/base/aaIncomeRow.cpp index be2a6ee..02a62cd 100644 --- a/storage/aaIncomeRow.cpp +++ b/storage/base/aaIncomeRow.cpp @@ -19,15 +19,15 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsComponentManagerUtils.h" #include "nsStringAPI.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ #include "aaIncomeRow.h" diff --git a/storage/aaIncomeRow.h b/storage/base/aaIncomeRow.h similarity index 98% rename from storage/aaIncomeRow.h rename to storage/base/aaIncomeRow.h index b4ccbbe..735ad65 100644 --- a/storage/aaIncomeRow.h +++ b/storage/base/aaIncomeRow.h @@ -25,6 +25,8 @@ class mozIStorageStatement; class mozIStorageConnection; +#include "aaAmountUtils.h" + class aaIncomeRow { public: diff --git a/storage/aaLoadBalance.cpp b/storage/base/aaLoadBalance.cpp similarity index 91% rename from storage/aaLoadBalance.cpp rename to storage/base/aaLoadBalance.cpp index f6fe2d7..14e6984 100644 --- a/storage/aaLoadBalance.cpp +++ b/storage/base/aaLoadBalance.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,17 +28,16 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" +#include "aaIState.h" +#include "aaIBalance.h" +#include "aaIFilter.h" #include "aaLoadBalance.h" #define AA_LOADBALANCE_SELECT_QUERY "SELECT balance.flow_id, flow.tag,\ diff --git a/storage/aaLoadBalance.h b/storage/base/aaLoadBalance.h similarity index 100% rename from storage/aaLoadBalance.h rename to storage/base/aaLoadBalance.h diff --git a/storage/aaLoadEntity.cpp b/storage/base/aaLoadEntity.cpp similarity index 90% rename from storage/aaLoadEntity.cpp rename to storage/base/aaLoadEntity.cpp index de54a52..10a3854 100644 --- a/storage/aaLoadEntity.cpp +++ b/storage/base/aaLoadEntity.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,12 +28,11 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include +#include "aaIEntity.h" #include "aaLoadEntity.h" #define AA_LOADENTITY_SELECT_QUERY "SELECT id,tag FROM entity" diff --git a/storage/aaLoadEntity.h b/storage/base/aaLoadEntity.h similarity index 100% rename from storage/aaLoadEntity.h rename to storage/base/aaLoadEntity.h index a20364f..ecded9b 100644 --- a/storage/aaLoadEntity.h +++ b/storage/base/aaLoadEntity.h @@ -22,11 +22,11 @@ #ifndef AALOADENTITY_H #define AALOADENTITY_H 1 -#include "aaLoadQuery.h" - #define AA_LOADENTITY_CID \ {0xc4bf8150, 0x5fe4, 0x409c, {0xbb, 0x30, 0x7b, 0x0f, 0x77, 0xeb, 0x04, 0x0e}} +#include "aaLoadQuery.h" + class aaLoadEntity : public aaLoadQuery { public: diff --git a/storage/aaLoadFactList.cpp b/storage/base/aaLoadFactList.cpp similarity index 93% rename from storage/aaLoadFactList.cpp rename to storage/base/aaLoadFactList.cpp index afcf51f..391845b 100644 --- a/storage/aaLoadFactList.cpp +++ b/storage/base/aaLoadFactList.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,15 +28,14 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include +#include "aaIFlow.h" +#include "aaIEvent.h" +#include "aaIFact.h" +#include "aaITransaction.h" #include "aaLoadFactList.h" #define AA_LOADFACTLIST_SELECT_QUERY "SELECT strftime('%s',transfer.day),\ diff --git a/storage/aaLoadFactList.h b/storage/base/aaLoadFactList.h similarity index 100% rename from storage/aaLoadFactList.h rename to storage/base/aaLoadFactList.h diff --git a/storage/aaLoadFlow.cpp b/storage/base/aaLoadFlow.cpp similarity index 92% rename from storage/aaLoadFlow.cpp rename to storage/base/aaLoadFlow.cpp index d3c4585..65234c8 100644 --- a/storage/aaLoadFlow.cpp +++ b/storage/base/aaLoadFlow.cpp @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=cpp: */ /* - * Copyright (C) 2007 Sergey Yanovich + * Copyright (C) 2007 Sergey Yanovich "ynvich@gmail.com" * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,14 +28,13 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" #include "aaLoadFlow.h" #define AA_LOADFLOW_SELECT_QUERY "SELECT flow.id, flow.tag, flow.entity_id,\ diff --git a/storage/aaLoadFlow.h b/storage/base/aaLoadFlow.h similarity index 100% rename from storage/aaLoadFlow.h rename to storage/base/aaLoadFlow.h diff --git a/storage/aaLoadFlowChart.cpp b/storage/base/aaLoadFlowChart.cpp similarity index 94% rename from storage/aaLoadFlowChart.cpp rename to storage/base/aaLoadFlowChart.cpp index 8658659..98a2eb8 100644 --- a/storage/aaLoadFlowChart.cpp +++ b/storage/base/aaLoadFlowChart.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,14 +28,13 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" #include "aaLoadFlowChart.h" #define AA_LOADFLOWEXT_SELECT_QUERY "SELECT flow.id, flow.tag, flow.entity_id,\ diff --git a/storage/aaLoadFlowChart.h b/storage/base/aaLoadFlowChart.h similarity index 100% rename from storage/aaLoadFlowChart.h rename to storage/base/aaLoadFlowChart.h diff --git a/storage/aaLoadFlowStates.cpp b/storage/base/aaLoadFlowStates.cpp similarity index 90% rename from storage/aaLoadFlowStates.cpp rename to storage/base/aaLoadFlowStates.cpp index 3fe69b9..229e538 100644 --- a/storage/aaLoadFlowStates.cpp +++ b/storage/base/aaLoadFlowStates.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,16 +28,15 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" +#include "aaIState.h" +#include "aaIFilter.h" #include "aaLoadFlowStates.h" #define AA_LOADFLOWSTATES_SELECT_QUERY "SELECT state.flow_id, flow.tag,\ diff --git a/storage/aaLoadFlowStates.h b/storage/base/aaLoadFlowStates.h similarity index 100% rename from storage/aaLoadFlowStates.h rename to storage/base/aaLoadFlowStates.h diff --git a/storage/aaLoadIncome.cpp b/storage/base/aaLoadIncome.cpp similarity index 86% rename from storage/aaLoadIncome.cpp rename to storage/base/aaLoadIncome.cpp index 5141a8a..6585b77 100644 --- a/storage/aaLoadIncome.cpp +++ b/storage/base/aaLoadIncome.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,17 +28,16 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" +#include "aaIState.h" +#include "aaIBalance.h" +#include "aaIFilter.h" #include "aaLoadIncome.h" #define AA_LOADINCOME_SELECT_QUERY "SELECT income.side, income.value\ diff --git a/storage/aaLoadIncome.h b/storage/base/aaLoadIncome.h similarity index 100% rename from storage/aaLoadIncome.h rename to storage/base/aaLoadIncome.h diff --git a/storage/aaLoadPendingFacts.cpp b/storage/base/aaLoadPendingFacts.cpp similarity index 92% rename from storage/aaLoadPendingFacts.cpp rename to storage/base/aaLoadPendingFacts.cpp index a03e67c..6bc5f00 100644 --- a/storage/aaLoadPendingFacts.cpp +++ b/storage/base/aaLoadPendingFacts.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,14 +28,13 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include +#include "aaIFlow.h" +#include "aaIEvent.h" +#include "aaIFact.h" #include "aaLoadPendingFacts.h" #define AA_LOADPENDINGFACTS_SELECT_QUERY "SELECT strftime('%s',transfer.day),\ diff --git a/storage/aaLoadPendingFacts.h b/storage/base/aaLoadPendingFacts.h similarity index 100% rename from storage/aaLoadPendingFacts.h rename to storage/base/aaLoadPendingFacts.h diff --git a/storage/aaLoadQuery.cpp b/storage/base/aaLoadQuery.cpp similarity index 92% rename from storage/aaLoadQuery.cpp rename to storage/base/aaLoadQuery.cpp index 026024d..ab3cbd0 100644 --- a/storage/aaLoadQuery.cpp +++ b/storage/base/aaLoadQuery.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -30,14 +30,13 @@ #include "nsIWeakReferenceUtils.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include +#include "aaIDataNode.h" +#include "aaStorageUtils.h" +#include "aaIFilter.h" #include "aaLoadQuery.h" aaLoadQuery::aaLoadQuery(nsISupports *aOuter) diff --git a/storage/aaLoadQuery.h b/storage/base/aaLoadQuery.h similarity index 98% rename from storage/aaLoadQuery.h rename to storage/base/aaLoadQuery.h index c335159..de640c6 100644 --- a/storage/aaLoadQuery.h +++ b/storage/base/aaLoadQuery.h @@ -22,6 +22,8 @@ #ifndef AALOADQUERY_H #define AALOADQUERY_H 1 +#include "aaILoadQuery.h" + class mozIStorageConnection; class mozIStorageStatement; class aaIDataNode; diff --git a/storage/aaLoadQuote.cpp b/storage/base/aaLoadQuote.cpp similarity index 92% rename from storage/aaLoadQuote.cpp rename to storage/base/aaLoadQuote.cpp index 24b0020..8f3d99b 100644 --- a/storage/aaLoadQuote.cpp +++ b/storage/base/aaLoadQuote.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,13 +28,12 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include +#include "aaIResource.h" +#include "aaIQuote.h" #include "aaLoadQuote.h" #define AA_LOADQUOTE_SELECT_QUERY "SELECT quote.resource_id, resource.tag,\ diff --git a/storage/aaLoadQuote.h b/storage/base/aaLoadQuote.h similarity index 100% rename from storage/aaLoadQuote.h rename to storage/base/aaLoadQuote.h diff --git a/storage/aaLoadResource.cpp b/storage/base/aaLoadResource.cpp similarity index 91% rename from storage/aaLoadResource.cpp rename to storage/base/aaLoadResource.cpp index d6f054a..9a13619 100644 --- a/storage/aaLoadResource.cpp +++ b/storage/base/aaLoadResource.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIMutableArray.h" @@ -28,12 +28,11 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include +#include "aaIResource.h" #include "aaLoadResource.h" #define AA_LOADRESOURCE_SELECT_QUERY "SELECT id,tag FROM resource" diff --git a/storage/aaLoadResource.h b/storage/base/aaLoadResource.h similarity index 98% rename from storage/aaLoadResource.h rename to storage/base/aaLoadResource.h index 8565f95..4b183cb 100644 --- a/storage/aaLoadResource.h +++ b/storage/base/aaLoadResource.h @@ -27,6 +27,8 @@ #define AA_LOADRESOURCE_CID \ {0x143071a7, 0xbc37, 0x4817, {0xbe, 0x7f, 0xb2, 0x1d, 0xb1, 0x1a, 0x45, 0x91}} +#include "aaILoadQuery.h" + class aaLoadResource : public aaLoadQuery { public: diff --git a/storage/aaSaveDispatcher.cpp b/storage/base/aaSaveDispatcher.cpp similarity index 90% rename from storage/aaSaveDispatcher.cpp rename to storage/base/aaSaveDispatcher.cpp index 49a7ab9..9c94131 100644 --- a/storage/aaSaveDispatcher.cpp +++ b/storage/base/aaSaveDispatcher.cpp @@ -19,21 +19,20 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" /* Unfrozen API */ /* Project includes */ -#include -#include -#include -#include -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" +#include "aaIEvent.h" +#include "aaIQuote.h" +#include "aaITransaction.h" +#include "aaISession.h" #include "aaSaveDispatcher.h" aaSaveDispatcher::aaSaveDispatcher(nsISupports *aSession) diff --git a/storage/aaSaveDispatcher.h b/storage/base/aaSaveDispatcher.h similarity index 97% rename from storage/aaSaveDispatcher.h rename to storage/base/aaSaveDispatcher.h index 210180c..7d908c3 100644 --- a/storage/aaSaveDispatcher.h +++ b/storage/base/aaSaveDispatcher.h @@ -26,6 +26,9 @@ {0xd657bc39, 0xf9b7, 0x41b9, {0xad, 0xd3, 0x0f, 0x31, 0xae, 0xcf, 0xc3, 0xb2}} #define AA_SAVEDISPATCHER_CONTRACT_ID "@aasii.org/storage/save-dispatcher;1" +#include "aaISaveQuery.h" +#include "aaIHandler.h" + class aaIEntity; class aaIObject; class aaIFlow; diff --git a/storage/aaSaveEntity.cpp b/storage/base/aaSaveEntity.cpp similarity index 94% rename from storage/aaSaveEntity.cpp rename to storage/base/aaSaveEntity.cpp index 2d9cac4..ee78ab5 100644 --- a/storage/aaSaveEntity.cpp +++ b/storage/base/aaSaveEntity.cpp @@ -19,19 +19,18 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include +#include "aaIEntity.h" #include "aaSaveEntity.h" aaSaveEntity::aaSaveEntity(nsISupports *aOuter) diff --git a/storage/aaSaveEntity.h b/storage/base/aaSaveEntity.h similarity index 98% rename from storage/aaSaveEntity.h rename to storage/base/aaSaveEntity.h index 7b551e8..c90c8be 100644 --- a/storage/aaSaveEntity.h +++ b/storage/base/aaSaveEntity.h @@ -26,6 +26,8 @@ {0x94bf571c, 0x8ba1, 0x4442, {0xbf, 0xbe, 0x46, 0x48, 0x4f, 0x20, 0x27, 0x66}} #define AA_SAVEENTITY_CONTRACT_ID "@aasii.org/storage/save-entity;1" +#include "aaISaveQuery.h" + class aaIDataNode; class mozIStorageConnection; class nsACString; diff --git a/storage/aaSaveEvent.cpp b/storage/base/aaSaveEvent.cpp similarity index 98% rename from storage/aaSaveEvent.cpp rename to storage/base/aaSaveEvent.cpp index be66f50..d1e4450 100644 --- a/storage/aaSaveEvent.cpp +++ b/storage/base/aaSaveEvent.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" @@ -28,15 +28,14 @@ #include "nsArrayUtils.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIFlow.h" +#include "aaIFact.h" +#include "aaIEvent.h" #include "aaSaveEvent.h" #include "aaGuard.h" diff --git a/storage/aaSaveEvent.h b/storage/base/aaSaveEvent.h similarity index 98% rename from storage/aaSaveEvent.h rename to storage/base/aaSaveEvent.h index 6a5d487..a377046 100644 --- a/storage/aaSaveEvent.h +++ b/storage/base/aaSaveEvent.h @@ -26,6 +26,8 @@ {0xc1b3d0a4, 0x9286, 0x42aa, {0xa1, 0x0f, 0x5c, 0x72, 0xa9, 0x7a, 0x04, 0x90}} #define AA_SAVEEVENT_CONTRACT_ID "@aasii.org/storage/save-event;1" +#include "aaISaveQuery.h" + class aaIDataNode; class mozIStorageConnection; class aaIEvent; diff --git a/storage/aaSaveFlow.cpp b/storage/base/aaSaveFlow.cpp similarity index 95% rename from storage/aaSaveFlow.cpp rename to storage/base/aaSaveFlow.cpp index 9ebf447..6aedaa1 100644 --- a/storage/aaSaveFlow.cpp +++ b/storage/base/aaSaveFlow.cpp @@ -19,21 +19,20 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" #include "aaSaveFlow.h" #include "aaGuard.h" diff --git a/storage/aaSaveFlow.h b/storage/base/aaSaveFlow.h similarity index 98% rename from storage/aaSaveFlow.h rename to storage/base/aaSaveFlow.h index ca049f2..b46ff6f 100644 --- a/storage/aaSaveFlow.h +++ b/storage/base/aaSaveFlow.h @@ -26,6 +26,8 @@ {0xf55fca12, 0x3ce3, 0x4b1e, {0x82, 0x41, 0x9f, 0x28, 0xf2, 0x8f, 0x14, 0x42}} #define AA_SAVEFLOW_CONTRACT_ID "@aasii.org/storage/save-flow;1" +#include "aaISaveQuery.h" + class aaIDataNode; class mozIStorageConnection; class nsACString; diff --git a/storage/aaSaveQuote.cpp b/storage/base/aaSaveQuote.cpp similarity index 91% rename from storage/aaSaveQuote.cpp rename to storage/base/aaSaveQuote.cpp index 41ab759..6522f03 100644 --- a/storage/aaSaveQuote.cpp +++ b/storage/base/aaSaveQuote.cpp @@ -19,20 +19,19 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include +#include "aaIResource.h" +#include "aaIQuote.h" #include "aaSaveQuote.h" #define AA_QUOTE_SAVE "INSERT INTO quote (resource_id, day, rate) VALUES\ diff --git a/storage/aaSaveQuote.h b/storage/base/aaSaveQuote.h similarity index 98% rename from storage/aaSaveQuote.h rename to storage/base/aaSaveQuote.h index 0a2fff4..60cdc77 100644 --- a/storage/aaSaveQuote.h +++ b/storage/base/aaSaveQuote.h @@ -26,6 +26,8 @@ {0x85840a0f, 0x41fb, 0x4b4d, {0x9f, 0xf8, 0xb0, 0x74, 0x56, 0x46, 0x31, 0xd1}} #define AA_SAVEQUOTE_CONTRACT_ID "@aasii.org/storage/save-quote;1" +#include "aaISaveQuery.h" + class aaIDataNode; class mozIStorageConnection; diff --git a/storage/aaSaveResource.cpp b/storage/base/aaSaveResource.cpp similarity index 94% rename from storage/aaSaveResource.cpp rename to storage/base/aaSaveResource.cpp index e9c30e9..ac2019f 100644 --- a/storage/aaSaveResource.cpp +++ b/storage/base/aaSaveResource.cpp @@ -19,19 +19,18 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include +#include "aaIResource.h" #include "aaSaveResource.h" aaSaveResource::aaSaveResource(nsISupports *aOuter) diff --git a/storage/aaSaveResource.h b/storage/base/aaSaveResource.h similarity index 98% rename from storage/aaSaveResource.h rename to storage/base/aaSaveResource.h index 53198b8..11c8c89 100644 --- a/storage/aaSaveResource.h +++ b/storage/base/aaSaveResource.h @@ -26,6 +26,8 @@ {0x2f790daf, 0xc155, 0x4018, {0x8a, 0x49, 0x0e, 0xf3, 0xc7, 0x44, 0x65, 0x36}} #define AA_SAVERESOURCE_CONTRACT_ID "@aasii.org/storage/save-resource;1" +#include "aaISaveQuery.h" + class aaIDataNode; class mozIStorageConnection; class nsACString; diff --git a/storage/aaSaveTransaction.cpp b/storage/base/aaSaveTransaction.cpp similarity index 98% rename from storage/aaSaveTransaction.cpp rename to storage/base/aaSaveTransaction.cpp index 21880a2..01da6cd 100644 --- a/storage/aaSaveTransaction.cpp +++ b/storage/base/aaSaveTransaction.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include #include "nsCOMPtr.h" @@ -27,15 +27,13 @@ #include "nsEmbedString.h" /* Unfrozen API */ -#include "unstable/mozIStorageConnection.h" -#include "unstable/mozIStorageStatement.h" +#include "mozIStorageConnection.h" +#include "mozIStorageStatement.h" /* Project includes */ -#include -#include -#include -#include -#include "aaIncomeRow.h" +#include "aaIFlow.h" +#include "aaIFact.h" +#include "aaITransaction.h" #include "aaSaveTransaction.h" #include "aaGuard.h" diff --git a/storage/aaSaveTransaction.h b/storage/base/aaSaveTransaction.h similarity index 98% rename from storage/aaSaveTransaction.h rename to storage/base/aaSaveTransaction.h index da3b37b..f0ae08e 100644 --- a/storage/aaSaveTransaction.h +++ b/storage/base/aaSaveTransaction.h @@ -22,12 +22,14 @@ #ifndef AASAVETRANSACTION_H #define AASAVETRANSACTION_H 1 -#include "nsTArray.h" - #define AA_SAVETRANSACTION_CID \ {0x72516923, 0x1133, 0x4dab, {0xbb, 0x10, 0xe4, 0x47, 0xed, 0xa5, 0x03, 0xf2}} #define AA_SAVETRANSACTION_CONTRACT_ID "@aasii.org/storage/save-transaction;1" +#include "nsTArray.h" +#include "aaISaveQuery.h" +#include "aaIncomeRow.h" + class aaIFact; class aaFullQuote diff --git a/storage/aaSession.cpp b/storage/base/aaSession.cpp similarity index 96% rename from storage/aaSession.cpp rename to storage/base/aaSession.cpp index 993f85e..1fb6ded 100644 --- a/storage/aaSession.cpp +++ b/storage/base/aaSession.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsComponentManagerUtils.h" @@ -31,14 +31,13 @@ #include "nsIArray.h" /* Unfrozen API */ -#include "unstable/nsAppDirectoryServiceDefs.h" -#include "unstable/mozStorageCID.h" -#include "unstable/mozIStorageService.h" -#include "unstable/mozIStorageConnection.h" +#include "nsAppDirectoryServiceDefs.h" +#include "mozStorageCID.h" +#include "mozIStorageService.h" +#include "mozIStorageConnection.h" /* Project includes */ -#include -#include +#include "aaILoadQuery.h" #include "aaSession.h" aaSession::aaSession() diff --git a/storage/aaSession.h b/storage/base/aaSession.h similarity index 98% rename from storage/aaSession.h rename to storage/base/aaSession.h index 2f5af00..a44ff86 100644 --- a/storage/aaSession.h +++ b/storage/base/aaSession.h @@ -25,6 +25,8 @@ #define AA_SESSION_CID \ {0xc7eb3168, 0x85f9, 0x4fa2, {0x9e, 0x0f, 0xec, 0xd4, 0x21, 0xf3, 0x6e, 0x98}} +#include "aaISession.h" + class mozIStorageConnection; class aaSession : public aaISession diff --git a/storage/aaStateFilter.cpp b/storage/base/aaStateFilter.cpp similarity index 95% rename from storage/aaStateFilter.cpp rename to storage/base/aaStateFilter.cpp index 72e23f0..faf4b1c 100644 --- a/storage/aaStateFilter.cpp +++ b/storage/base/aaStateFilter.cpp @@ -19,16 +19,15 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsStringAPI.h" #include "nsEmbedString.h" /* Project includes */ -#include -#include -#include +#include "aaIFlow.h" +#include "aaStorageUtils.h" #include "aaStateFilter.h" aaStateFilter::aaStateFilter() diff --git a/storage/aaStateFilter.h b/storage/base/aaStateFilter.h similarity index 98% rename from storage/aaStateFilter.h rename to storage/base/aaStateFilter.h index 3a452db..5d97b85 100644 --- a/storage/aaStateFilter.h +++ b/storage/base/aaStateFilter.h @@ -25,6 +25,8 @@ #define AA_STATEFILTER_CID \ {0xd0af30e2, 0x46ef, 0x43f6, {0xa0, 0xa1, 0x71, 0x69, 0x9a, 0xc1, 0x6f, 0x3e}} +#include "aaIStateFilter.h" + class aaIFlow; class aaStateFilter : public aaIStateFilter diff --git a/storage/aaStorageModule.cpp b/storage/base/aaStorageModule.cpp similarity index 92% rename from storage/aaStorageModule.cpp rename to storage/base/aaStorageModule.cpp index 8d2f4a5..4b68f3c 100644 --- a/storage/aaStorageModule.cpp +++ b/storage/base/aaStorageModule.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsIGenericFactory.h" @@ -28,16 +28,10 @@ #include "nsEmbedString.h" /* Project includes */ -#include -#include -#include -#include -#include -#include -#include -#include +#include "aaParamFactory.h" +#include "aaIFlow.h" #include "aaSession.h" -#include +#include "aaBaseLoaders.h" #include "aaSaveDispatcher.h" #include "aaFilter.h" #include "aaStateFilter.h" @@ -59,7 +53,7 @@ #include "aaSaveTransaction.h" /* XXX _acc This belongs to a separate module */ -#include +#include "aaAccountLoaders.h" NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(aaSession, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveDispatcher) diff --git a/storage/aaStorageUtils.cpp b/storage/base/aaStorageUtils.cpp similarity index 100% rename from storage/aaStorageUtils.cpp rename to storage/base/aaStorageUtils.cpp diff --git a/base/test/Makefile.in b/storage/base/test/Makefile.in similarity index 91% copy from base/test/Makefile.in copy to storage/base/test/Makefile.in index c89b8c1..3b1812b 100644 --- a/base/test/Makefile.in +++ b/storage/base/test/Makefile.in @@ -35,29 +35,29 @@ # # ***** END LICENSE BLOCK ***** -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = base -LIBRARY_NAME = aabase_t -SHORT_LIBNAME = aabase_t +MODULE = storage +LIBRARY_NAME = storage_t +SHORT_LIBNAME = storag_t EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = aaBaseTest +MODULE_NAME = aaStorageTest REQUIRES = \ xpcom \ string \ - intl \ xpunit \ + base \ $(NULL) CPPSRCS = \ - aaBaseTest.cpp \ + aaStorageTest.cpp \ $(NULL) include $(topsrcdir)/config/rules.mk @@ -69,6 +69,5 @@ LOCAL_INCLUDES = \ EXTRA_DSO_LDOPTS+= \ $(XPCOM_GLUE_LDOPTS) \ $(NSPR_LIBS) \ - $(MOZ_JS_LIBS) \ - ../$(LIB_PREFIX)aabase$(DLL_SUFFIX) \ + ../aaSession.$(OBJ_SUFFIX) \ $(NULL) diff --git a/storage/aaStorageTest.cpp b/storage/base/test/aaStorageTest.cpp similarity index 97% rename from storage/aaStorageTest.cpp rename to storage/base/test/aaStorageTest.cpp index a4ede5d..4dfda68 100644 --- a/storage/aaStorageTest.cpp +++ b/storage/base/test/aaStorageTest.cpp @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "xpcom-config.h" #include "nsCOMPtr.h" #include "nsEmbedString.h" @@ -30,27 +30,23 @@ #include "nsArrayUtils.h" /* Unfrozen API */ -#include "unstable/nsIStringEnumerator.h" -#include "unstable/nsAutoPtr.h" -#include -#include -#include -#include +#include "nsIStringEnumerator.h" +#include "nsAutoPtr.h" +#include "nsTestUtils.h" +#include "nsITest.h" +#include "nsITestRunner.h" +#include "mozIStorageConnection.h" /* Project includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aaAmountUtils.h" +#include "aaIEntity.h" +#include "aaIResource.h" +#include "aaIFlow.h" +#include "aaIFact.h" +#include "aaIState.h" +#include "aaIEvent.h" #include "aaSession.h" -#include +#include "aaBaseLoaders.h" #include "aaSaveDispatcher.h" #include "aaFilter.h" #include "aaSaveEntity.h" @@ -61,7 +57,7 @@ #include "aaLoadFlow.h" #include "aaSaveEvent.h" #include "aaLoadFlowStates.h" -#include +#include "aaTestConsts.h" #define AA_STORAGE_TEST_CID \ {0x1e7c924e, 0x872d, 0x4c4e, {0xb8, 0x1c, 0x58, 0xd9, 0x66, 0x4a, 0xe9, 0xd1}} @@ -106,7 +102,7 @@ private: NS_IMPL_ISUPPORTS2(aaStorageTest, nsITest, - nsIUTF8StringEnumerator); + nsIUTF8StringEnumerator) /* nsITest */ NS_IMETHODIMP diff --git a/xpcom/Makefile.in b/xpcom/Makefile.in index 80eac0f..f89ed32 100644 --- a/xpcom/Makefile.in +++ b/xpcom/Makefile.in @@ -47,6 +47,7 @@ GRE_MODULE = 1 EXPORTS = \ aaParamFactory.h \ + aaAmountUtils.h \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/abstract/aacore.h b/xpcom/aaAmountUtils.h similarity index 80% rename from abstract/aacore.h rename to xpcom/aaAmountUtils.h index 95a9e72..1db06a2 100644 --- a/abstract/aacore.h +++ b/xpcom/aaAmountUtils.h @@ -19,20 +19,12 @@ * Boston, MA 02111-1307, USA. */ -#ifndef AACORE_H -#define AACORE_H - -#include -#include "xpcom-config.h" -#include "prtypes.h" -#include - -#define NO_IMPL_STUB \ - printf_stderr("\n%s:%u: run-time error: not implemented\n", __FILE__,__LINE__) +#ifndef AAAMOUNTUTILS_H +#define AAAMOUNTUTILS_H inline PRBool isZero(double val) { return (val < 0.00009) && (val > -0.00009);} inline double normVal(double val) { return ((PRInt64) (val * 10000 + 0.5)) / 10000.0; } -#endif /* AACORE_H */ +#endif /* AAAMOUNTUTILS_H */ -- 2.11.4.GIT