1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=cpp: */
4 * Copyright (C) 2007 Sergey Yanovich <ynvich@gmail.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #include <abstract/aacore.h>
25 #include "nsIGenericFactory.h"
26 #include "nsIMutableArray.h"
27 #include "nsCOMArray.h"
28 #include "nsEmbedString.h"
30 /* Project includes */
31 #include <abstract/aaParamFactory.h>
32 #include <abstract/base/aaIFlow.h>
33 #include <abstract/base/aaIHandler.h>
34 #include <abstract/storage/aaISession.h>
35 #include <abstract/storage/aaISaveQuery.h>
36 #include <abstract/storage/aaILoadQuery.h>
37 #include <abstract/storage/aaIFilter.h>
38 #include <abstract/storage/aaIStateFilter.h>
39 #include "aaSession.h"
40 #include <abstract/storage/aaBaseLoaders.h>
41 #include "aaSaveDispatcher.h"
43 #include "aaStateFilter.h"
44 #include "aaSaveEntity.h"
45 #include "aaLoadEntity.h"
46 #include "aaSaveResource.h"
47 #include "aaLoadResource.h"
48 #include "aaSaveFlow.h"
49 #include "aaLoadFlow.h"
50 #include "aaSaveEvent.h"
51 #include "aaLoadFlowStates.h"
52 #include "aaLoadBalance.h"
53 #include "aaLoadPendingFacts.h"
54 #include "aaLoadFactList.h"
55 #include "aaSaveQuote.h"
56 #include "aaLoadQuote.h"
57 #include "aaSaveTransaction.h"
59 /* XXX _acc This belongs to a separate module */
60 #include <abstract/storage/aaAccountLoaders.h>
62 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(aaSession
, Init
)
63 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveDispatcher
)
64 NS_GENERIC_FACTORY_CONSTRUCTOR(aaFilter
)
65 NS_GENERIC_FACTORY_CONSTRUCTOR(aaStateFilter
)
66 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveEntity
)
67 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadEntity
)
68 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveResource
)
69 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadResource
)
70 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveFlow
)
71 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadFlow
)
72 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveEvent
)
73 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadFlowStates
)
75 /* XXX _acc This belongs to a separate module */
76 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadBalance
)
77 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadPendingFacts
)
78 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadFactList
)
79 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveQuote
)
80 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaLoadQuote
)
81 NS_GENERIC_FACTORY_CONSTRUCTOR_PARAM(aaSaveTransaction
)
83 static const nsModuleComponentInfo kComponents
[] =
88 AA_SESSION_CONTRACT_ID
,
93 AA_SAVEDISPATCHER_CID
,
94 AA_SAVEDISPATCHER_CONTRACT_ID
,
95 aaSaveDispatcherConstructor
100 AA_FILTER_CONTRACT_ID
,
104 "SQL Filter for State Interface",
106 AA_STATEFILTER_CONTRACT_ID
,
107 aaStateFilterConstructor
112 AA_SAVEENTITY_CONTRACT_ID
,
113 aaSaveEntityConstructor
118 AA_LOADENTITY_CONTRACT_ID
,
119 aaLoadEntityConstructor
122 "Save Resource Query",
124 AA_SAVERESOURCE_CONTRACT_ID
,
125 aaSaveResourceConstructor
128 "Load Resource Query",
130 AA_LOADRESOURCE_CONTRACT_ID
,
131 aaLoadResourceConstructor
136 AA_SAVEFLOW_CONTRACT_ID
,
137 aaSaveFlowConstructor
142 AA_LOADFLOW_CONTRACT_ID
,
143 aaLoadFlowConstructor
148 AA_SAVEEVENT_CONTRACT_ID
,
149 aaSaveEventConstructor
152 "Load Flow States Query",
153 AA_LOADFLOWSTATES_CID
,
154 AA_LOADFLOWSTATES_CONTRACT_ID
,
155 aaLoadFlowStatesConstructor
158 /* XXX _acc This belongs to a separate module */
160 "Load Balance Query",
162 AA_LOADBALANCE_CONTRACT_ID
,
163 aaLoadBalanceConstructor
166 "Load Pending Facts Query",
167 AA_LOADPENDINGFACTS_CID
,
168 AA_LOADPENDINGFACTS_CONTRACT_ID
,
169 aaLoadPendingFactsConstructor
174 AA_LOADFACTLIST_CONTRACT_ID
,
175 aaLoadFactListConstructor
180 AA_SAVEQUOTE_CONTRACT_ID
,
181 aaSaveQuoteConstructor
186 AA_LOADQUOTE_CONTRACT_ID
,
187 aaLoadQuoteConstructor
190 "Save Transaction Query",
191 AA_SAVETRANSACTION_CID
,
192 AA_SAVETRANSACTION_CONTRACT_ID
,
193 aaSaveTransactionConstructor
196 NS_IMPL_NSGETMODULE(aastorage
, kComponents
)