LibreOffice Module cppuhelper (master) 1
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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_FACTORY_HXX
24#define INCLUDED_CPPUHELPER_FACTORY_HXX
25
26#include "sal/config.h"
27
28#include <cstddef>
29
30#include "rtl/ustring.hxx"
31#include "rtl/unload.h"
32
33#include "com/sun/star/uno/Reference.h"
35
36namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
37namespace com { namespace sun { namespace star { namespace lang { class XSingleComponentFactory; } } } }
38namespace com { namespace sun { namespace star { namespace lang { class XSingleServiceFactory; } } } }
39namespace com { namespace sun { namespace star { namespace registry { class XRegistryKey; } } } }
40namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
41namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
42namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
43
44#define COMPONENT_GETENV "component_getImplementationEnvironment"
45#define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
46#define COMPONENT_WRITEINFO "component_writeInfo"
47#define COMPONENT_GETFACTORY "component_getFactory"
48
49typedef struct _uno_Environment uno_Environment;
50
61 const char ** ppEnvTypeName, uno_Environment ** ppEnv );
62
74 char const ** ppEnvTypeName,
75 uno_Environment ** ppEnv,
76 char const * pImplName,
77 uno_Environment * pTargetEnv
78);
79
86typedef const char * (SAL_CALL * component_getDescriptionFunc)(void);
87
103 void * pServiceManager, void * pRegistryKey );
104
120typedef void * (SAL_CALL * component_getFactoryFunc)(
121 const char * pImplName, void * pServiceManager, void * pRegistryKey );
122
123
124namespace cppu
125{
126
133typedef css::uno::Reference< css::uno::XInterface >(
134 SAL_CALL * ComponentFactoryFunc)(
135 css::uno::Reference< css::uno::XComponentContext > const & xContext );
136
145CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory >
147 ComponentFactoryFunc fptr,
148 ::rtl::OUString const & rImplementationName,
149 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
150 rtl_ModuleCount * pModCount = NULL );
151
162CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL
164 ComponentFactoryFunc fptr,
165 ::rtl::OUString const & rImplementationName,
166 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
167 rtl_ModuleCount * pModCount = NULL );
168
175typedef css::uno::Reference< css::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
176 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
177
192CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
194 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
195 const ::rtl::OUString & rImplementationName,
196 ComponentInstantiation pCreateFunction,
197 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
198 rtl_ModuleCount * pModCount = NULL );
199
214CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
216 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
217 const css::uno::Reference< css::lang::XSingleServiceFactory > & rFactory );
218
233CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
235 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
236 const ::rtl::OUString & rComponentName,
237 ComponentInstantiation pCreateFunction,
238 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
239 rtl_ModuleCount * pModCount = NULL );
240
250CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
252 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
253 const ::rtl::OUString & rImplementationName,
254 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
255
268CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
270 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
271 const ::rtl::OUString & rComponentName,
272 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
273
274}
275
276#endif
277
278/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CPPUHELPER_DLLPUBLIC
ComponentInstantiation pCreateFunction
Definition: factory.cxx:136
const char *(SAL_CALL * component_getDescriptionFunc)(void)
Function pointer declaration.
Definition: factory.hxx:86
void(SAL_CALL * component_getImplementationEnvironmentExtFunc)(char const **ppEnvTypeName, uno_Environment **ppEnv, char const *pImplName, uno_Environment *pTargetEnv)
Function pointer declaration.
Definition: factory.hxx:73
void(SAL_CALL * component_getImplementationEnvironmentFunc)(const char **ppEnvTypeName, uno_Environment **ppEnv)
Function pointer declaration.
Definition: factory.hxx:60
struct _uno_Environment uno_Environment
Definition: factory.hxx:49
sal_Bool(SAL_CALL * component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:102
void *(SAL_CALL * component_getFactoryFunc)(const char *pImplName, void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:120
Reference< XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory(const Reference< XMultiServiceFactory > &rServiceManager, const OUString &rImplementationName, const Reference< XRegistryKey > &rImplementationKey)
Definition: factory.cxx:829
css::uno::Reference< css::uno::XInterface >(SAL_CALL *ComponentFactoryFunc)(css CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory(ComponentFactoryFunc fptr, ::rtl::OUString const &rImplementationName, css::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Function pointer declaration.
Definition: factory.hxx:146
Reference< XSingleServiceFactory > SAL_CALL createSingleRegistryFactory(const Reference< XMultiServiceFactory > &rServiceManager, const OUString &rImplementationName, const Reference< XRegistryKey > &rImplementationKey)
Definition: factory.cxx:819
Reference< XSingleServiceFactory > SAL_CALL createOneInstanceFactory(const Reference< XMultiServiceFactory > &rServiceManager, const OUString &rImplementationName, ComponentInstantiation pCreateFunction, const Sequence< OUString > &rServiceNames, rtl_ModuleCount *)
Definition: factory.cxx:807
Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFactory(ComponentFactoryFunc fptr, OUString const &rImplementationName, Sequence< OUString > const &rServiceNames, rtl_ModuleCount *)
Definition: factory.cxx:849
css::uno::Reference< css::uno::XInterface >(SAL_CALL *ComponentInstantiation)(const css CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL 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.
Definition: factory.hxx:193
Reference< XSingleServiceFactory > SAL_CALL createFactoryProxy(SAL_UNUSED_PARAMETER const Reference< XMultiServiceFactory > &, const Reference< XSingleServiceFactory > &rFactory)
Definition: factory.cxx:799
unsigned char sal_Bool