Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : :
21 : : #include "bootstrapservices.hxx"
22 : :
23 : : #include "cppuhelper/factory.hxx"
24 : : #include "cppuhelper/implementationentry.hxx"
25 : : #include "sal/types.h"
26 : : #include "uno/environment.h"
27 : : #include "uno/lbnames.h"
28 : :
29 : : #include <stdio.h>
30 : :
31 : : using namespace com::sun::star;
32 : : using namespace com::sun::star::uno;
33 : : using namespace cppu;
34 : : using namespace osl;
35 : :
36 : : extern rtl_StandardModuleCount g_moduleCount;
37 : :
38 : : using namespace stoc_bootstrap;
39 : :
40 : : static struct ImplementationEntry g_entries[] =
41 : : {
42 : : //servicemanager
43 : : {
44 : : OServiceManager_CreateInstance, smgr_getImplementationName,
45 : : smgr_getSupportedServiceNames, createSingleComponentFactory,
46 : : &g_moduleCount.modCnt , 0
47 : : },
48 : : {
49 : : ORegistryServiceManager_CreateInstance, regsmgr_getImplementationName,
50 : : regsmgr_getSupportedServiceNames, createSingleComponentFactory,
51 : : &g_moduleCount.modCnt , 0
52 : : },
53 : : {
54 : : OServiceManagerWrapper_CreateInstance, smgr_wrapper_getImplementationName,
55 : : smgr_wrapper_getSupportedServiceNames, createSingleComponentFactory,
56 : : &g_moduleCount.modCnt , 0
57 : : },
58 : : //security
59 : : {
60 : : ac_create, ac_getImplementationName,
61 : : ac_getSupportedServiceNames, createSingleComponentFactory,
62 : : &g_moduleCount.modCnt, 0
63 : : },
64 : : {
65 : : filepolicy_create, filepolicy_getImplementationName,
66 : : filepolicy_getSupportedServiceNames, createSingleComponentFactory,
67 : : &g_moduleCount.modCnt, 0
68 : : },
69 : : //simpleregistry
70 : : {
71 : : SimpleRegistry_CreateInstance, simreg_getImplementationName,
72 : : simreg_getSupportedServiceNames, createSingleComponentFactory,
73 : : &g_moduleCount.modCnt , 0
74 : : },
75 : : //defaultregistry
76 : : {
77 : : NestedRegistry_CreateInstance, defreg_getImplementationName,
78 : : defreg_getSupportedServiceNames, createSingleComponentFactory,
79 : : &g_moduleCount.modCnt , 0
80 : : },
81 : : //implementationregistry
82 : : {
83 : : ImplementationRegistration_CreateInstance, impreg_getImplementationName,
84 : : impreg_getSupportedServiceNames, createSingleComponentFactory,
85 : : &g_moduleCount.modCnt , 0
86 : : },
87 : : //loader
88 : : {
89 : : DllComponentLoader_CreateInstance, loader_getImplementationName,
90 : : loader_getSupportedServiceNames, createSingleComponentFactory,
91 : : &g_moduleCount.modCnt , 0
92 : : },
93 : : //registry_tdprovider
94 : : {
95 : : ProviderImpl_create, rdbtdp_getImplementationName,
96 : : rdbtdp_getSupportedServiceNames, createSingleComponentFactory,
97 : : &g_moduleCount.modCnt , 0
98 : : },
99 : : //tdmanager
100 : : {
101 : : ManagerImpl_create, tdmgr_getImplementationName,
102 : : tdmgr_getSupportedServiceNames, createSingleComponentFactory,
103 : : &g_moduleCount.modCnt , 0
104 : : },
105 : : //end
106 : : { 0, 0, 0, 0, 0, 0 }
107 : : };
108 : :
109 : : extern "C"
110 : : {
111 : :
112 : : #ifndef DISABLE_DYNLOADING
113 : 0 : SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
114 : : {
115 : 0 : return g_moduleCount.canUnload( &g_moduleCount , pTime );
116 : : }
117 : : #endif
118 : :
119 : : #ifdef DISABLE_DYNLOADING
120 : : #define component_getFactory bootstrap_component_getFactory
121 : : #endif
122 : :
123 : : //==================================================================================================
124 : 10036 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
125 : : const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
126 : : {
127 : 10036 : return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
128 : : }
129 : :
130 : : }
131 : :
132 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|