1*647a425cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*647a425cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*647a425cSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*647a425cSAndrew Rist * distributed with this work for additional information
6*647a425cSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*647a425cSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*647a425cSAndrew Rist * "License"); you may not use this file except in compliance
9*647a425cSAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*647a425cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*647a425cSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*647a425cSAndrew Rist * software distributed under the License is distributed on an
15*647a425cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*647a425cSAndrew Rist * KIND, either express or implied. See the License for the
17*647a425cSAndrew Rist * specific language governing permissions and limitations
18*647a425cSAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*647a425cSAndrew Rist *************************************************************/
21*647a425cSAndrew Rist
22*647a425cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_stoc.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include "bootstrapservices.hxx"
28cdf0e10cSrcweir
29cdf0e10cSrcweir #include "cppuhelper/factory.hxx"
30cdf0e10cSrcweir #include "cppuhelper/implementationentry.hxx"
31cdf0e10cSrcweir #include "sal/types.h"
32cdf0e10cSrcweir #include "uno/environment.h"
33cdf0e10cSrcweir #include "uno/lbnames.h"
34cdf0e10cSrcweir
35cdf0e10cSrcweir #include <stdio.h>
36cdf0e10cSrcweir
37cdf0e10cSrcweir using namespace com::sun::star;
38cdf0e10cSrcweir using namespace com::sun::star::uno;
39cdf0e10cSrcweir using namespace cppu;
40cdf0e10cSrcweir using namespace osl;
41cdf0e10cSrcweir using namespace rtl;
42cdf0e10cSrcweir
43cdf0e10cSrcweir extern rtl_StandardModuleCount g_moduleCount;
44cdf0e10cSrcweir
45cdf0e10cSrcweir using namespace stoc_bootstrap;
46cdf0e10cSrcweir
47cdf0e10cSrcweir static struct ImplementationEntry g_entries[] =
48cdf0e10cSrcweir {
49cdf0e10cSrcweir //servicemanager
50cdf0e10cSrcweir {
51cdf0e10cSrcweir OServiceManager_CreateInstance, smgr_getImplementationName,
52cdf0e10cSrcweir smgr_getSupportedServiceNames, createSingleComponentFactory,
53cdf0e10cSrcweir &g_moduleCount.modCnt , 0
54cdf0e10cSrcweir },
55cdf0e10cSrcweir {
56cdf0e10cSrcweir ORegistryServiceManager_CreateInstance, regsmgr_getImplementationName,
57cdf0e10cSrcweir regsmgr_getSupportedServiceNames, createSingleComponentFactory,
58cdf0e10cSrcweir &g_moduleCount.modCnt , 0
59cdf0e10cSrcweir },
60cdf0e10cSrcweir {
61cdf0e10cSrcweir OServiceManagerWrapper_CreateInstance, smgr_wrapper_getImplementationName,
62cdf0e10cSrcweir smgr_wrapper_getSupportedServiceNames, createSingleComponentFactory,
63cdf0e10cSrcweir &g_moduleCount.modCnt , 0
64cdf0e10cSrcweir },
65cdf0e10cSrcweir //security
66cdf0e10cSrcweir {
67cdf0e10cSrcweir ac_create, ac_getImplementationName,
68cdf0e10cSrcweir ac_getSupportedServiceNames, createSingleComponentFactory,
69cdf0e10cSrcweir &g_moduleCount.modCnt, 0
70cdf0e10cSrcweir },
71cdf0e10cSrcweir {
72cdf0e10cSrcweir filepolicy_create, filepolicy_getImplementationName,
73cdf0e10cSrcweir filepolicy_getSupportedServiceNames, createSingleComponentFactory,
74cdf0e10cSrcweir &g_moduleCount.modCnt, 0
75cdf0e10cSrcweir },
76cdf0e10cSrcweir //simpleregistry
77cdf0e10cSrcweir {
78cdf0e10cSrcweir SimpleRegistry_CreateInstance, simreg_getImplementationName,
79cdf0e10cSrcweir simreg_getSupportedServiceNames, createSingleComponentFactory,
80cdf0e10cSrcweir &g_moduleCount.modCnt , 0
81cdf0e10cSrcweir },
82cdf0e10cSrcweir //defaultregistry
83cdf0e10cSrcweir {
84cdf0e10cSrcweir NestedRegistry_CreateInstance, defreg_getImplementationName,
85cdf0e10cSrcweir defreg_getSupportedServiceNames, createSingleComponentFactory,
86cdf0e10cSrcweir &g_moduleCount.modCnt , 0
87cdf0e10cSrcweir },
88cdf0e10cSrcweir //implementationregistry
89cdf0e10cSrcweir {
90cdf0e10cSrcweir ImplementationRegistration_CreateInstance, impreg_getImplementationName,
91cdf0e10cSrcweir impreg_getSupportedServiceNames, createSingleComponentFactory,
92cdf0e10cSrcweir &g_moduleCount.modCnt , 0
93cdf0e10cSrcweir },
94cdf0e10cSrcweir //loader
95cdf0e10cSrcweir {
96cdf0e10cSrcweir DllComponentLoader_CreateInstance, loader_getImplementationName,
97cdf0e10cSrcweir loader_getSupportedServiceNames, createSingleComponentFactory,
98cdf0e10cSrcweir &g_moduleCount.modCnt , 0
99cdf0e10cSrcweir },
100cdf0e10cSrcweir //registry_tdprovider
101cdf0e10cSrcweir {
102cdf0e10cSrcweir ProviderImpl_create, rdbtdp_getImplementationName,
103cdf0e10cSrcweir rdbtdp_getSupportedServiceNames, createSingleComponentFactory,
104cdf0e10cSrcweir &g_moduleCount.modCnt , 0
105cdf0e10cSrcweir },
106cdf0e10cSrcweir //tdmanager
107cdf0e10cSrcweir {
108cdf0e10cSrcweir ManagerImpl_create, tdmgr_getImplementationName,
109cdf0e10cSrcweir tdmgr_getSupportedServiceNames, createSingleComponentFactory,
110cdf0e10cSrcweir &g_moduleCount.modCnt , 0
111cdf0e10cSrcweir },
112cdf0e10cSrcweir //end
113cdf0e10cSrcweir { 0, 0, 0, 0, 0, 0 }
114cdf0e10cSrcweir };
115cdf0e10cSrcweir
116cdf0e10cSrcweir extern "C"
117cdf0e10cSrcweir {
118cdf0e10cSrcweir
component_canUnload(TimeValue * pTime)119cdf0e10cSrcweir sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
120cdf0e10cSrcweir {
121cdf0e10cSrcweir return g_moduleCount.canUnload( &g_moduleCount , pTime );
122cdf0e10cSrcweir }
123cdf0e10cSrcweir
124cdf0e10cSrcweir //==================================================================================================
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)125cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(
126cdf0e10cSrcweir const sal_Char ** ppEnvTypeName, uno_Environment ** )
127cdf0e10cSrcweir {
128cdf0e10cSrcweir *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
129cdf0e10cSrcweir }
130cdf0e10cSrcweir //==================================================================================================
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)131cdf0e10cSrcweir void * SAL_CALL component_getFactory(
132cdf0e10cSrcweir const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
133cdf0e10cSrcweir {
134cdf0e10cSrcweir return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
135cdf0e10cSrcweir }
136cdf0e10cSrcweir
137cdf0e10cSrcweir }
138