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