My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
factory.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _CPPUHELPER_FACTORY_HXX_
29 #define _CPPUHELPER_FACTORY_HXX_
30 
31 #include <rtl/ustring.hxx>
32 #include <uno/dispatcher.h>
33 #include <rtl/unload.h>
34 
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
37 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
38 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
39 #include <com/sun/star/registry/XRegistryKey.hpp>
40 #include "cppuhelperdllapi.h"
41 
42 //##################################################################################################
43 
44 #define COMPONENT_GETENV "component_getImplementationEnvironment"
45 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
46 #define COMPONENT_GETDESCRIPTION "component_getDescription"
47 #define COMPONENT_WRITEINFO "component_writeInfo"
48 #define COMPONENT_GETFACTORY "component_getFactory"
49 
51 
62  const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv );
63 
75  sal_Char const ** ppEnvTypeName,
76  uno_Environment ** ppEnv,
77  sal_Char const * pImplName,
78  uno_Environment * pTargetEnv
79 );
80 
87 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
88 
103 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
104  void * pServiceManager, void * pRegistryKey );
105 
121 typedef void * (SAL_CALL * component_getFactoryFunc)(
122  const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
123 
124 //##################################################################################################
125 
126 namespace cppu
127 {
128 
135 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(
136  SAL_CALL * ComponentFactoryFunc)(
138  SAL_THROW( (::com::sun::star::uno::Exception) );
139 
147 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory >
150  ::rtl::OUString const & rImplementationName,
151  ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
152  rtl_ModuleCount * pModCount = 0 )
153  SAL_THROW(());
154 
164 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL
167  ::rtl::OUString const & rImplementationName,
168  ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
169  rtl_ModuleCount * pModCount = 0 )
170  SAL_THROW(());
171 
178 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
179  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager );
180 
194 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
196  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
197  const ::rtl::OUString & rImplementationName,
198  ComponentInstantiation pCreateFunction,
199  const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
200  rtl_ModuleCount * pModCount = 0 )
201  SAL_THROW(());
202 
217 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
219  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
220  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory )
221  SAL_THROW(());
222 
236 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
238  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
239  const ::rtl::OUString & rComponentName,
240  ComponentInstantiation pCreateFunction,
241  const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
242  rtl_ModuleCount * pModCount = 0 )
243  SAL_THROW(());
244 
254 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
256  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
257  const ::rtl::OUString & rImplementationName,
258  const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
259  SAL_THROW(());
260 
273 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
275  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
276  const ::rtl::OUString & rComponentName,
277  const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
278  SAL_THROW(());
279 
280 }
281 
282 #endif
283 
284 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */