UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 #ifndef _CPPUHELPER_FACTORY_HXX_ 00029 #define _CPPUHELPER_FACTORY_HXX_ 00030 00031 #include <rtl/ustring.hxx> 00032 #include <uno/dispatcher.h> 00033 #include <rtl/unload.h> 00034 00035 #include <com/sun/star/uno/XComponentContext.hpp> 00036 #include <com/sun/star/lang/XSingleComponentFactory.hpp> 00037 #include <com/sun/star/lang/XSingleServiceFactory.hpp> 00038 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 00039 #include <com/sun/star/registry/XRegistryKey.hpp> 00040 #include "cppuhelperdllapi.h" 00041 00042 //################################################################################################## 00043 00044 #define COMPONENT_GETENV "component_getImplementationEnvironment" 00045 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt" 00046 #define COMPONENT_GETDESCRIPTION "component_getDescription" 00047 #define COMPONENT_WRITEINFO "component_writeInfo" 00048 #define COMPONENT_GETFACTORY "component_getFactory" 00049 00050 typedef struct _uno_Environment uno_Environment; 00051 00061 typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)( 00062 const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ); 00063 00074 typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)( 00075 sal_Char const ** ppEnvTypeName, 00076 uno_Environment ** ppEnv, 00077 sal_Char const * pImplName, 00078 uno_Environment * pTargetEnv 00079 ); 00080 00087 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void); 00088 00103 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)( 00104 void * pServiceManager, void * pRegistryKey ); 00105 00121 typedef void * (SAL_CALL * component_getFactoryFunc)( 00122 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ); 00123 00124 //################################################################################################## 00125 00126 namespace cppu 00127 { 00128 00135 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >( 00136 SAL_CALL * ComponentFactoryFunc)( 00137 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext ) 00138 SAL_THROW( (::com::sun::star::uno::Exception) ); 00139 00147 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > 00148 SAL_CALL createSingleComponentFactory( 00149 ComponentFactoryFunc fptr, 00150 ::rtl::OUString const & rImplementationName, 00151 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, 00152 rtl_ModuleCount * pModCount = 0 ) 00153 SAL_THROW(()); 00154 00164 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL 00165 createOneInstanceComponentFactory( 00166 ComponentFactoryFunc fptr, 00167 ::rtl::OUString const & rImplementationName, 00168 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, 00169 rtl_ModuleCount * pModCount = 0 ) 00170 SAL_THROW(()); 00171 00178 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)( 00179 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager ); 00180 00194 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL 00195 createSingleFactory( 00196 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, 00197 const ::rtl::OUString & rImplementationName, 00198 ComponentInstantiation pCreateFunction, 00199 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, 00200 rtl_ModuleCount * pModCount = 0 ) 00201 SAL_THROW(()); 00202 00217 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL 00218 createFactoryProxy( 00219 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, 00220 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory ) 00221 SAL_THROW(()); 00222 00236 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL 00237 createOneInstanceFactory( 00238 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, 00239 const ::rtl::OUString & rComponentName, 00240 ComponentInstantiation pCreateFunction, 00241 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, 00242 rtl_ModuleCount * pModCount = 0 ) 00243 SAL_THROW(()); 00244 00254 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL 00255 createSingleRegistryFactory( 00256 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, 00257 const ::rtl::OUString & rImplementationName, 00258 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) 00259 SAL_THROW(()); 00260 00273 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL 00274 createOneInstanceRegistryFactory( 00275 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, 00276 const ::rtl::OUString & rComponentName, 00277 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) 00278 SAL_THROW(()); 00279 00280 } 00281 00282 #endif 00283 00284 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */