xref: /AOO41X/main/odk/examples/cpp/custompanel/ctp_services.cxx (revision abfe7a5a2afd40460bdbc5c1a51909ee2d9b5a04)
1760d135fSAriel Constenla-Haile /**************************************************************
2760d135fSAriel Constenla-Haile  *
3760d135fSAriel Constenla-Haile  * Licensed to the Apache Software Foundation (ASF) under one
4760d135fSAriel Constenla-Haile  * or more contributor license agreements.  See the NOTICE file
5760d135fSAriel Constenla-Haile  * distributed with this work for additional information
6760d135fSAriel Constenla-Haile  * regarding copyright ownership.  The ASF licenses this file
7760d135fSAriel Constenla-Haile  * to you under the Apache License, Version 2.0 (the
8760d135fSAriel Constenla-Haile  * "License"); you may not use this file except in compliance
9760d135fSAriel Constenla-Haile  * with the License.  You may obtain a copy of the License at
10760d135fSAriel Constenla-Haile  *
11760d135fSAriel Constenla-Haile  *   http://www.apache.org/licenses/LICENSE-2.0
12760d135fSAriel Constenla-Haile  *
13760d135fSAriel Constenla-Haile  * Unless required by applicable law or agreed to in writing,
14760d135fSAriel Constenla-Haile  * software distributed under the License is distributed on an
15760d135fSAriel Constenla-Haile  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16760d135fSAriel Constenla-Haile  * KIND, either express or implied.  See the License for the
17760d135fSAriel Constenla-Haile  * specific language governing permissions and limitations
18760d135fSAriel Constenla-Haile  * under the License.
19760d135fSAriel Constenla-Haile  *
20760d135fSAriel Constenla-Haile  *************************************************************/
21760d135fSAriel Constenla-Haile 
22760d135fSAriel Constenla-Haile 
23760d135fSAriel Constenla-Haile 
24760d135fSAriel Constenla-Haile 
25760d135fSAriel Constenla-Haile #include "ctp_factory.hxx"
26760d135fSAriel Constenla-Haile 
27760d135fSAriel Constenla-Haile /** === begin UNO includes === **/
28760d135fSAriel Constenla-Haile /** === end UNO includes === **/
29760d135fSAriel Constenla-Haile 
30760d135fSAriel Constenla-Haile #include <cppuhelper/implementationentry.hxx>
31760d135fSAriel Constenla-Haile 
32760d135fSAriel Constenla-Haile //......................................................................................................................
33760d135fSAriel Constenla-Haile namespace sd { namespace colortoolpanel
34760d135fSAriel Constenla-Haile {
35760d135fSAriel Constenla-Haile //......................................................................................................................
36760d135fSAriel Constenla-Haile 
37760d135fSAriel Constenla-Haile 
38760d135fSAriel Constenla-Haile 	//==================================================================================================================
39760d135fSAriel Constenla-Haile     //= descriptors for the services implemented in this component
40760d135fSAriel Constenla-Haile     //==================================================================================================================
41760d135fSAriel Constenla-Haile     static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
42760d135fSAriel Constenla-Haile     {
43760d135fSAriel Constenla-Haile         {
44760d135fSAriel Constenla-Haile             ToolPanelFactory::Create,
45760d135fSAriel Constenla-Haile             ToolPanelFactory::getImplementationName_static,
46760d135fSAriel Constenla-Haile             ToolPanelFactory::getSupportedServiceNames_static,
47760d135fSAriel Constenla-Haile             ::cppu::createSingleComponentFactory, NULL, 0
48760d135fSAriel Constenla-Haile         },
49760d135fSAriel Constenla-Haile         { 0, 0, 0, 0, 0, 0 }
50760d135fSAriel Constenla-Haile     };
51760d135fSAriel Constenla-Haile 
52760d135fSAriel Constenla-Haile //......................................................................................................................
53760d135fSAriel Constenla-Haile } } // namespace sd::colortoolpanel
54760d135fSAriel Constenla-Haile //......................................................................................................................
55760d135fSAriel Constenla-Haile 
56760d135fSAriel Constenla-Haile extern "C"
57760d135fSAriel Constenla-Haile {
58760d135fSAriel Constenla-Haile     //------------------------------------------------------------------------------------------------------------------
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)59*abfe7a5aSAriel Constenla-Haile     SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
60760d135fSAriel Constenla-Haile     {
61760d135fSAriel Constenla-Haile         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
62760d135fSAriel Constenla-Haile     }
63760d135fSAriel Constenla-Haile 
64760d135fSAriel Constenla-Haile     //------------------------------------------------------------------------------------------------------------------
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)65*abfe7a5aSAriel Constenla-Haile     SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
66760d135fSAriel Constenla-Haile     {
67760d135fSAriel Constenla-Haile         return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::sd::colortoolpanel::s_aServiceEntries );
68760d135fSAriel Constenla-Haile     }
69760d135fSAriel Constenla-Haile }
70