1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_stoc.hxx" 26 27 #include "stocservices.hxx" 28 29 #include "cppuhelper/factory.hxx" 30 #include "cppuhelper/implementationentry.hxx" 31 #include "sal/types.h" 32 #include "uno/environment.h" 33 #include "uno/lbnames.h" 34 35 using namespace com::sun::star; 36 using namespace com::sun::star::uno; 37 using namespace cppu; 38 using namespace osl; 39 using namespace rtl; 40 using namespace stoc_services; 41 42 rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; 43 44 static struct ImplementationEntry g_entries[] = 45 { 46 // typeconv 47 { 48 TypeConverter_Impl_CreateInstance, tcv_getImplementationName, 49 tcv_getSupportedServiceNames, createSingleComponentFactory, 50 &g_moduleCount.modCnt , 0 51 }, 52 // uriproc 53 { 54 ExternalUriReferenceTranslator::create, 55 ExternalUriReferenceTranslator::getImplementationName, 56 ExternalUriReferenceTranslator::getSupportedServiceNames, 57 createSingleComponentFactory, 0, 0 58 }, 59 { 60 UriReferenceFactory::create, 61 UriReferenceFactory::getImplementationName, 62 UriReferenceFactory::getSupportedServiceNames, 63 createSingleComponentFactory, 0, 0 64 }, 65 { 66 UriSchemeParser_vndDOTsunDOTstarDOTexpand::create, 67 UriSchemeParser_vndDOTsunDOTstarDOTexpand::getImplementationName, 68 UriSchemeParser_vndDOTsunDOTstarDOTexpand::getSupportedServiceNames, 69 createSingleComponentFactory, 0, 0 70 }, 71 { 72 UriSchemeParser_vndDOTsunDOTstarDOTscript::create, 73 UriSchemeParser_vndDOTsunDOTstarDOTscript::getImplementationName, 74 UriSchemeParser_vndDOTsunDOTstarDOTscript::getSupportedServiceNames, 75 createSingleComponentFactory, 0, 0 76 }, 77 { 78 VndSunStarPkgUrlReferenceFactory::create, 79 VndSunStarPkgUrlReferenceFactory::getImplementationName, 80 VndSunStarPkgUrlReferenceFactory::getSupportedServiceNames, 81 createSingleComponentFactory, 0, 0 82 }, 83 { 0, 0, 0, 0, 0, 0 } 84 }; 85 86 extern "C" 87 { 88 89 sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) 90 { 91 return g_moduleCount.canUnload( &g_moduleCount , pTime ); 92 } 93 94 //================================================================================================== 95 void SAL_CALL component_getImplementationEnvironment( 96 const sal_Char ** ppEnvTypeName, uno_Environment ** ) 97 { 98 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; 99 } 100 //================================================================================================== 101 void * SAL_CALL component_getFactory( 102 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) 103 { 104 return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); 105 } 106 107 } 108