xref: /trunk/main/sdext/source/presenter/components.cxx (revision aa9633e79cf97d25152daf08078c72555c2e123f)
179e0a548SAriel Constenla-Haile /**************************************************************
279e0a548SAriel Constenla-Haile  *
379e0a548SAriel Constenla-Haile  * Licensed to the Apache Software Foundation (ASF) under one
479e0a548SAriel Constenla-Haile  * or more contributor license agreements.  See the NOTICE file
579e0a548SAriel Constenla-Haile  * distributed with this work for additional information
679e0a548SAriel Constenla-Haile  * regarding copyright ownership.  The ASF licenses this file
779e0a548SAriel Constenla-Haile  * to you under the Apache License, Version 2.0 (the
879e0a548SAriel Constenla-Haile  * "License"); you may not use this file except in compliance
979e0a548SAriel Constenla-Haile  * with the License.  You may obtain a copy of the License at
1079e0a548SAriel Constenla-Haile  *
1179e0a548SAriel Constenla-Haile  *   http://www.apache.org/licenses/LICENSE-2.0
1279e0a548SAriel Constenla-Haile  *
1379e0a548SAriel Constenla-Haile  * Unless required by applicable law or agreed to in writing,
1479e0a548SAriel Constenla-Haile  * software distributed under the License is distributed on an
1579e0a548SAriel Constenla-Haile  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1679e0a548SAriel Constenla-Haile  * KIND, either express or implied.  See the License for the
1779e0a548SAriel Constenla-Haile  * specific language governing permissions and limitations
1879e0a548SAriel Constenla-Haile  * under the License.
1979e0a548SAriel Constenla-Haile  *
2079e0a548SAriel Constenla-Haile  *************************************************************/
2179e0a548SAriel Constenla-Haile 
22*aa9633e7Smseidel 
23*aa9633e7Smseidel 
2479e0a548SAriel Constenla-Haile // MARKER(update_precomp.py): autogen include statement, do not remove
2579e0a548SAriel Constenla-Haile #include "precompiled_sdext.hxx"
2679e0a548SAriel Constenla-Haile 
2779e0a548SAriel Constenla-Haile #include <cppuhelper/factory.hxx>
2879e0a548SAriel Constenla-Haile #include <cppuhelper/implementationentry.hxx>
2979e0a548SAriel Constenla-Haile 
3079e0a548SAriel Constenla-Haile #include "PresenterProtocolHandler.hxx"
3179e0a548SAriel Constenla-Haile #include "PresenterScreen.hxx"
3279e0a548SAriel Constenla-Haile 
3379e0a548SAriel Constenla-Haile 
3479e0a548SAriel Constenla-Haile namespace sdext { namespace presenter {
3579e0a548SAriel Constenla-Haile 
3679e0a548SAriel Constenla-Haile 
3779e0a548SAriel Constenla-Haile rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
3879e0a548SAriel Constenla-Haile 
3979e0a548SAriel Constenla-Haile static struct cppu::ImplementationEntry gServiceEntries[] =
4079e0a548SAriel Constenla-Haile {
4179e0a548SAriel Constenla-Haile     {
4279e0a548SAriel Constenla-Haile         PresenterProtocolHandler::Create,
4379e0a548SAriel Constenla-Haile         PresenterProtocolHandler::getImplementationName_static,
4479e0a548SAriel Constenla-Haile         PresenterProtocolHandler::getSupportedServiceNames_static,
4579e0a548SAriel Constenla-Haile         cppu::createSingleComponentFactory, &g_moduleCount.modCnt, 0
4679e0a548SAriel Constenla-Haile     },
4779e0a548SAriel Constenla-Haile     {
4879e0a548SAriel Constenla-Haile         PresenterScreenJob::Create,
4979e0a548SAriel Constenla-Haile         PresenterScreenJob::getImplementationName_static,
5079e0a548SAriel Constenla-Haile         PresenterScreenJob::getSupportedServiceNames_static,
5179e0a548SAriel Constenla-Haile         cppu::createSingleComponentFactory, 0, 0
5279e0a548SAriel Constenla-Haile     },
5379e0a548SAriel Constenla-Haile     { 0, 0, 0, 0, 0, 0 }
5479e0a548SAriel Constenla-Haile };
5579e0a548SAriel Constenla-Haile 
5679e0a548SAriel Constenla-Haile extern "C"
5779e0a548SAriel Constenla-Haile {
component_canUnload(TimeValue * pTime)5879e0a548SAriel Constenla-Haile     SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
5979e0a548SAriel Constenla-Haile     {
6079e0a548SAriel Constenla-Haile         return g_moduleCount.canUnload( &g_moduleCount , pTime );
6179e0a548SAriel Constenla-Haile     }
6279e0a548SAriel Constenla-Haile 
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)6379e0a548SAriel Constenla-Haile     SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
6479e0a548SAriel Constenla-Haile         const sal_Char ** ppEnvTypeName, uno_Environment ** )
6579e0a548SAriel Constenla-Haile     {
6679e0a548SAriel Constenla-Haile         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
6779e0a548SAriel Constenla-Haile     }
6879e0a548SAriel Constenla-Haile 
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)6979e0a548SAriel Constenla-Haile     SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
7079e0a548SAriel Constenla-Haile         const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
7179e0a548SAriel Constenla-Haile     {
7279e0a548SAriel Constenla-Haile         return cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries);
7379e0a548SAriel Constenla-Haile     }
7479e0a548SAriel Constenla-Haile }
7579e0a548SAriel Constenla-Haile 
7679e0a548SAriel Constenla-Haile } } // end of namespace sdext::presenter
77