00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _CPPUHELPER_FACTORY_HXX_
00020 #define _CPPUHELPER_FACTORY_HXX_
00021
00022 #include <rtl/ustring.hxx>
00023 #include <uno/dispatcher.h>
00024 #include <rtl/unload.h>
00025
00026 #include <com/sun/star/uno/XComponentContext.hpp>
00027 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
00028 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
00029 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
00030 #include <com/sun/star/registry/XRegistryKey.hpp>
00031 #include "cppuhelperdllapi.h"
00032
00033
00034
00035 #define COMPONENT_GETENV "component_getImplementationEnvironment"
00036 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
00037 #define COMPONENT_GETDESCRIPTION "component_getDescription"
00038 #define COMPONENT_WRITEINFO "component_writeInfo"
00039 #define COMPONENT_GETFACTORY "component_getFactory"
00040
00041 typedef struct _uno_Environment uno_Environment;
00042
00052 typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)(
00053 const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv );
00054
00065 typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)(
00066 sal_Char const ** ppEnvTypeName,
00067 uno_Environment ** ppEnv,
00068 sal_Char const * pImplName,
00069 uno_Environment * pTargetEnv
00070 );
00071
00078 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
00079
00094 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
00095 void * pServiceManager, void * pRegistryKey );
00096
00112 typedef void * (SAL_CALL * component_getFactoryFunc)(
00113 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
00114
00115
00116
00117 namespace cppu
00118 {
00119
00126 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(
00127 SAL_CALL * ComponentFactoryFunc)(
00128 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext )
00129 SAL_THROW( (::com::sun::star::uno::Exception) );
00130
00138 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory >
00139 SAL_CALL createSingleComponentFactory(
00140 ComponentFactoryFunc fptr,
00141 ::rtl::OUString const & rImplementationName,
00142 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
00143 rtl_ModuleCount * pModCount = 0 )
00144 SAL_THROW(());
00145
00155 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL
00156 createOneInstanceComponentFactory(
00157 ComponentFactoryFunc fptr,
00158 ::rtl::OUString const & rImplementationName,
00159 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
00160 rtl_ModuleCount * pModCount = 0 )
00161 SAL_THROW(());
00162
00169 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
00170 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager );
00171
00185 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
00186 createSingleFactory(
00187 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
00188 const ::rtl::OUString & rImplementationName,
00189 ComponentInstantiation pCreateFunction,
00190 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
00191 rtl_ModuleCount * pModCount = 0 )
00192 SAL_THROW(());
00193
00208 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
00209 createFactoryProxy(
00210 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
00211 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory )
00212 SAL_THROW(());
00213
00227 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
00228 createOneInstanceFactory(
00229 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
00230 const ::rtl::OUString & rComponentName,
00231 ComponentInstantiation pCreateFunction,
00232 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
00233 rtl_ModuleCount * pModCount = 0 )
00234 SAL_THROW(());
00235
00245 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
00246 createSingleRegistryFactory(
00247 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
00248 const ::rtl::OUString & rImplementationName,
00249 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
00250 SAL_THROW(());
00251
00264 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
00265 createOneInstanceRegistryFactory(
00266 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
00267 const ::rtl::OUString & rComponentName,
00268 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
00269 SAL_THROW(());
00270
00271 }
00272
00273 #endif
00274
00275