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 #include <osl/diagnose.h>
25 #include <cppuhelper/factory.hxx>
26 #include <cppuhelper/implementationentry.hxx>
27
28 #include <com/sun/star/registry/XRegistryKey.hpp>
29
30 using namespace ::rtl;
31 using namespace ::cppu;
32 using namespace ::com::sun::star::uno;
33 using namespace ::com::sun::star::lang;
34 using namespace ::com::sun::star::registry;
35
36 #include "factreg.hxx"
37
38 namespace animcore
39 {
40 rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
41 }
42
43 using namespace animcore;
44
45 #define IMPLEMENTATION_ENTRY(N)\
46 {\
47 createInstance_##N, getImplementationName_##N ,\
48 getSupportedServiceNames_##N, createSingleComponentFactory ,\
49 &g_moduleCount.modCnt , 0\
50 }\
51
52 static struct ImplementationEntry g_entries[] =
53 {
54 IMPLEMENTATION_ENTRY( PAR ),
55 IMPLEMENTATION_ENTRY( SEQ ),
56 IMPLEMENTATION_ENTRY( ITERATE ),
57 IMPLEMENTATION_ENTRY( ANIMATE ),
58 IMPLEMENTATION_ENTRY( SET ),
59 IMPLEMENTATION_ENTRY( ANIMATECOLOR ),
60 IMPLEMENTATION_ENTRY( ANIMATEMOTION ),
61 IMPLEMENTATION_ENTRY( ANIMATETRANSFORM ),
62 IMPLEMENTATION_ENTRY( TRANSITIONFILTER ),
63 IMPLEMENTATION_ENTRY( AUDIO ),
64 IMPLEMENTATION_ENTRY( COMMAND ),
65 IMPLEMENTATION_ENTRY( TargetPropertiesCreator ),
66 { 0, 0, 0, 0, 0, 0 }
67 };
68
69 extern "C"
70 {
71
component_canUnload(TimeValue * pTime)72 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
73 {
74 return g_moduleCount.canUnload( &g_moduleCount , pTime );
75 }
76
77 //==================================================================================================
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)78 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
79 const sal_Char ** ppEnvTypeName, uno_Environment ** )
80 {
81 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
82 }
83 //==================================================================================================
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)84 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
85 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
86 {
87 return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
88 }
89
90 }
91