bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / cppuhelper / implementationentry.hxx
blob23f40a7f7453d89859e449dfb6bf99b970c0a294
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CPPUHELPER_IMPLEMENTATIONENTRY_HXX
20 #define INCLUDED_CPPUHELPER_IMPLEMENTATIONENTRY_HXX
22 #include "cppuhelper/factory.hxx"
23 #include "cppuhelper/cppuhelperdllapi.h"
25 namespace cppu
27 /** One struct instance represents all data necessary for registering one service implementation.
30 struct SAL_WARN_UNUSED ImplementationEntry
32 /** Function that creates an instance of the implementation
34 ComponentFactoryFunc create;
36 /** Function that returns the implementation-name of the implementation
37 (same as XServiceInfo.getImplementationName() ).
39 rtl::OUString (SAL_CALL * getImplementationName)();
41 /** Function that returns all supported servicenames of the implementation
42 ( same as XServiceInfo.getSupportedServiceNames() ).
44 css::uno::Sequence< rtl::OUString > (SAL_CALL * getSupportedServiceNames) ();
46 /** Function that creates a SingleComponentFactory.
48 The pModCount parameter is a backwards-compatibility remainder of a
49 removed library unloading feature; always set to null.
51 css::uno::Reference< css::lang::XSingleComponentFactory >
52 (SAL_CALL * createFactory)(
53 ComponentFactoryFunc fptr,
54 ::rtl::OUString const & rImplementationName,
55 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
56 rtl_ModuleCount * pModCount );
58 /** Backwards-compatibility remainder of a removed library unloading
59 feature; always set to null.
61 rtl_ModuleCount * moduleCounter;
63 /** Must be set to 0 !
64 For future extensions.
66 sal_Int32 nFlags;
69 /** Helper function for implementation of the component_writeInfo()-function.
71 @deprecated component_writeInfo should no longer be used in new components
73 @param pServiceManager The first parameter passed to component_writeInfo()-function
74 (This is an instance of the service manager, that creates the factory).
75 @param pRegistryKey The second parameter passed to the component_writeInfo()-function.
76 This is a reference to the registry key, into which the implementation
77 data shall be written to.
78 @param entries Each element of the entries-array must contains a function pointer
79 table for registering an implementation. The end of the array
80 must be marked with a 0 entry in the create-function.
81 @return sal_True, if all implementations could be registered, otherwise sal_False.
83 CPPUHELPER_DLLPUBLIC sal_Bool component_writeInfoHelper(
84 void *pServiceManager, void *pRegistryKey , const struct ImplementationEntry entries[] );
86 /** Helper function for implementation of the component_getFactory()-function,
87 that must be implemented by every shared library component.
89 @param pImplName The implementation-name to be instantiated ( This is the
90 first parameter passed to the component_getFactory
91 @param pServiceManager The second parameter passed to component_getFactory()-function
92 (This is a of the service manager, that creates the factory).
93 @param pRegistryKey The third parameter passed to the component_getFactory()-function.
94 This is a reference to the registry key, where the implementation
95 data has been written to.
96 @param entries Each element of the entries-array must contains a function pointer
97 table for creating a factor of the implementation. The end of the array
98 must be marked with a 0 entry in the create-function.
99 @return 0 if the helper failed to instantiate a factory, otherwise an acquired pointer
100 to a factory.
102 CPPUHELPER_DLLPUBLIC void *component_getFactoryHelper(
103 const sal_Char * pImplName,
104 void * pServiceManager,
105 void * pRegistryKey,
106 const struct ImplementationEntry entries[] );
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */