LibreOffice
LibreOffice 4.4 SDK 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  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_CPPUHELPER_FACTORY_HXX
20 #define INCLUDED_CPPUHELPER_FACTORY_HXX
21 
22 #include <rtl/ustring.hxx>
23 #include <rtl/unload.h>
24 
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
27 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include <com/sun/star/registry/XRegistryKey.hpp>
31 
32 
33 
34 #define COMPONENT_GETENV "component_getImplementationEnvironment"
35 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
36 #define COMPONENT_GETDESCRIPTION "component_getDescription"
37 #define COMPONENT_WRITEINFO "component_writeInfo"
38 #define COMPONENT_GETFACTORY "component_getFactory"
39 
41 
52  const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv );
53 
65  sal_Char const ** ppEnvTypeName,
66  uno_Environment ** ppEnv,
67  sal_Char const * pImplName,
68  uno_Environment * pTargetEnv
69 );
70 
77 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
78 
93 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
94  void * pServiceManager, void * pRegistryKey );
95 
111 typedef void * (SAL_CALL * component_getFactoryFunc)(
112  const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
113 
114 
115 
116 namespace cppu
117 {
118 
125 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(
126  SAL_CALL * ComponentFactoryFunc)(
128 
137 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory >
140  ::rtl::OUString const & rImplementationName,
141  ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
142  rtl_ModuleCount * pModCount = 0 );
143 
154 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL
157  ::rtl::OUString const & rImplementationName,
158  ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
159  rtl_ModuleCount * pModCount = 0 );
160 
167 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
168  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager );
169 
184 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
186  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
187  const ::rtl::OUString & rImplementationName,
188  ComponentInstantiation pCreateFunction,
189  const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
190  rtl_ModuleCount * pModCount = 0 );
191 
206 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
208  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
209  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory );
210 
225 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
227  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
228  const ::rtl::OUString & rComponentName,
229  ComponentInstantiation pCreateFunction,
230  const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
231  rtl_ModuleCount * pModCount = 0 );
232 
242 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
244  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
245  const ::rtl::OUString & rImplementationName,
246  const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey );
247 
260 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
262  const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
263  const ::rtl::OUString & rComponentName,
264  const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey );
265 
266 }
267 
268 #endif
269 
270 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */