LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
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 "sal/config.h"
23
24#include <cstddef>
25
26#include "rtl/ustring.hxx"
27#include "rtl/unload.h"
28
31
32namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
33namespace com { namespace sun { namespace star { namespace lang { class XSingleComponentFactory; } } } }
34namespace com { namespace sun { namespace star { namespace lang { class XSingleServiceFactory; } } } }
35namespace com { namespace sun { namespace star { namespace registry { class XRegistryKey; } } } }
36namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
37namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
38namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
39
40#define COMPONENT_GETENV "component_getImplementationEnvironment"
41#define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
42#define COMPONENT_WRITEINFO "component_writeInfo"
43#define COMPONENT_GETFACTORY "component_getFactory"
44
46
57 const char ** ppEnvTypeName, uno_Environment ** ppEnv );
58
70 char const ** ppEnvTypeName,
71 uno_Environment ** ppEnv,
72 char const * pImplName,
73 uno_Environment * pTargetEnv
74);
75
82typedef const char * (SAL_CALL * component_getDescriptionFunc)(void);
83
98typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
99 void * pServiceManager, void * pRegistryKey );
100
116typedef void * (SAL_CALL * component_getFactoryFunc)(
117 const char * pImplName, void * pServiceManager, void * pRegistryKey );
118
119
120namespace cppu
121{
122
129typedef css::uno::Reference< css::uno::XInterface >(
130 SAL_CALL * ComponentFactoryFunc)(
131 css::uno::Reference< css::uno::XComponentContext > const & xContext );
132
141CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory >
144 ::rtl::OUString const & rImplementationName,
145 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
146 rtl_ModuleCount * pModCount = NULL );
147
158CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL
161 ::rtl::OUString const & rImplementationName,
162 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
163 rtl_ModuleCount * pModCount = NULL );
164
171typedef css::uno::Reference< css::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
172 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
173
188CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
190 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
191 const ::rtl::OUString & rImplementationName,
192 ComponentInstantiation pCreateFunction,
193 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
194 rtl_ModuleCount * pModCount = NULL );
195
210CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
212 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
213 const css::uno::Reference< css::lang::XSingleServiceFactory > & rFactory );
214
229CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
231 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
232 const ::rtl::OUString & rComponentName,
233 ComponentInstantiation pCreateFunction,
234 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
235 rtl_ModuleCount * pModCount = NULL );
236
246CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
248 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
249 const ::rtl::OUString & rImplementationName,
250 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
251
264CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
266 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
267 const ::rtl::OUString & rComponentName,
268 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
269
270}
271
272#endif
273
274/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned char sal_Bool
Definition: types.h:34
Backwards-compatibility remainders of a removed library unloading feature.
struct SAL_DLLPUBLIC_RTTI _rtl_ModuleCount rtl_ModuleCount
Backwards-compatibility remainder of a removed library unloading feature.
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
const char *(* component_getDescriptionFunc)(void)
Function pointer declaration.
Definition: factory.hxx:82
void *(* component_getFactoryFunc)(const char *pImplName, void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:116
void(* component_getImplementationEnvironmentFunc)(const char **ppEnvTypeName, uno_Environment **ppEnv)
Function pointer declaration.
Definition: factory.hxx:56
void(* component_getImplementationEnvironmentExtFunc)(char const **ppEnvTypeName, uno_Environment **ppEnv, char const *pImplName, uno_Environment *pTargetEnv)
Function pointer declaration.
Definition: factory.hxx:69
sal_Bool(* component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:98
Definition: Enterable.hxx:27
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createFactoryProxy(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const css::uno::Reference< css::lang::XSingleServiceFactory > &rFactory)
Deprecated.
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createSingleFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, ComponentInstantiation pCreateFunction, const css::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Deprecated.
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > createOneInstanceComponentFactory(ComponentFactoryFunc fptr, ::rtl::OUString const &rImplementationName, css::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Creates a single service factory which holds the instance created only once.
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createSingleRegistryFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, const css::uno::Reference< css::registry::XRegistryKey > &rImplementationKey)
Deprecated.
css::uno::Reference< css::uno::XInterface >(* ComponentFactoryFunc)(css::uno::Reference< css::uno::XComponentContext > const &xContext)
Function pointer declaration.
Definition: factory.hxx:130
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > createSingleComponentFactory(ComponentFactoryFunc fptr, ::rtl::OUString const &rImplementationName, css::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Creates a single component factory supporting the XSingleComponentFactory interface.
css::uno::Reference< css::uno::XInterface >(* ComponentInstantiation)(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager)
Deprecated.
Definition: factory.hxx:171
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createOneInstanceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, ComponentInstantiation pCreateFunction, const css::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Deprecated.
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createOneInstanceRegistryFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, const css::uno::Reference< css::registry::XRegistryKey > &rImplementationKey)
Deprecated.
Definition: unotype.hxx:35
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:161
The binary specification of a UNO environment.
Definition: environment.h:42