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
10*647a425cSAndrew Rist  *
11*647a425cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*647a425cSAndrew Rist  *
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.
19*647a425cSAndrew Rist  *
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 "stocservices.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 using namespace com::sun::star;
36cdf0e10cSrcweir using namespace com::sun::star::uno;
37cdf0e10cSrcweir using namespace cppu;
38cdf0e10cSrcweir using namespace osl;
39cdf0e10cSrcweir using namespace rtl;
40cdf0e10cSrcweir using namespace stoc_services;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir static struct ImplementationEntry g_entries[] =
45cdf0e10cSrcweir {
46cdf0e10cSrcweir     // typeconv
47cdf0e10cSrcweir     {
48cdf0e10cSrcweir 	TypeConverter_Impl_CreateInstance, tcv_getImplementationName,
49cdf0e10cSrcweir 	tcv_getSupportedServiceNames, createSingleComponentFactory,
50cdf0e10cSrcweir 	&g_moduleCount.modCnt , 0
51cdf0e10cSrcweir     },
52cdf0e10cSrcweir     // uriproc
53cdf0e10cSrcweir     {
54cdf0e10cSrcweir 	ExternalUriReferenceTranslator::create,
55cdf0e10cSrcweir 	ExternalUriReferenceTranslator::getImplementationName,
56cdf0e10cSrcweir 	ExternalUriReferenceTranslator::getSupportedServiceNames,
57cdf0e10cSrcweir 	createSingleComponentFactory, 0, 0
58cdf0e10cSrcweir     },
59cdf0e10cSrcweir     {
60cdf0e10cSrcweir 	UriReferenceFactory::create,
61cdf0e10cSrcweir 	UriReferenceFactory::getImplementationName,
62cdf0e10cSrcweir 	UriReferenceFactory::getSupportedServiceNames,
63cdf0e10cSrcweir 	createSingleComponentFactory, 0, 0
64cdf0e10cSrcweir     },
65cdf0e10cSrcweir     {
66cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTexpand::create,
67cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTexpand::getImplementationName,
68cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTexpand::getSupportedServiceNames,
69cdf0e10cSrcweir 	createSingleComponentFactory, 0, 0
70cdf0e10cSrcweir     },
71cdf0e10cSrcweir     {
72cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTscript::create,
73cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTscript::getImplementationName,
74cdf0e10cSrcweir 	UriSchemeParser_vndDOTsunDOTstarDOTscript::getSupportedServiceNames,
75cdf0e10cSrcweir 	createSingleComponentFactory, 0, 0
76cdf0e10cSrcweir     },
77cdf0e10cSrcweir     {
78cdf0e10cSrcweir 	VndSunStarPkgUrlReferenceFactory::create,
79cdf0e10cSrcweir 	VndSunStarPkgUrlReferenceFactory::getImplementationName,
80cdf0e10cSrcweir 	VndSunStarPkgUrlReferenceFactory::getSupportedServiceNames,
81cdf0e10cSrcweir 	createSingleComponentFactory, 0, 0
82cdf0e10cSrcweir     },
83cdf0e10cSrcweir     { 0, 0, 0, 0, 0, 0 }
84cdf0e10cSrcweir };
85cdf0e10cSrcweir 
86cdf0e10cSrcweir extern "C"
87cdf0e10cSrcweir {
88cdf0e10cSrcweir 
component_canUnload(TimeValue * pTime)89cdf0e10cSrcweir sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
90cdf0e10cSrcweir {
91cdf0e10cSrcweir 	return g_moduleCount.canUnload( &g_moduleCount , pTime );
92cdf0e10cSrcweir }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir //==================================================================================================
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)95cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(
96cdf0e10cSrcweir 	const sal_Char ** ppEnvTypeName, uno_Environment ** )
97cdf0e10cSrcweir {
98cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
99cdf0e10cSrcweir }
100cdf0e10cSrcweir //==================================================================================================
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)101cdf0e10cSrcweir void * SAL_CALL component_getFactory(
102cdf0e10cSrcweir 	const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
103cdf0e10cSrcweir {
104cdf0e10cSrcweir 	return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
105cdf0e10cSrcweir }
106cdf0e10cSrcweir 
107cdf0e10cSrcweir }
108