tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / cppuhelper / implementationentry.hxx
blobb99460014c082e06728f9b63bc4e67c976614ce4
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 .
21 * This file is part of LibreOffice published API.
23 #ifndef INCLUDED_CPPUHELPER_IMPLEMENTATIONENTRY_HXX
24 #define INCLUDED_CPPUHELPER_IMPLEMENTATIONENTRY_HXX
26 #include "cppuhelper/factory.hxx"
27 #include "cppuhelper/cppuhelperdllapi.h"
29 namespace cppu
31 /** One struct instance represents all data necessary for registering one service implementation.
34 struct SAL_WARN_UNUSED ImplementationEntry
36 /** Function that creates an instance of the implementation
38 ComponentFactoryFunc create;
40 /** Function that returns the implementation-name of the implementation
41 (same as XServiceInfo.getImplementationName() ).
43 rtl::OUString (SAL_CALL * getImplementationName)();
45 /** Function that returns all supported servicenames of the implementation
46 ( same as XServiceInfo.getSupportedServiceNames() ).
48 css::uno::Sequence< rtl::OUString > (SAL_CALL * getSupportedServiceNames) ();
50 /** Function that creates a SingleComponentFactory.
52 The pModCount parameter is a backwards-compatibility remainder of a
53 removed library unloading feature; always set to null.
55 css::uno::Reference< css::lang::XSingleComponentFactory >
56 (SAL_CALL * createFactory)(
57 ComponentFactoryFunc fptr,
58 ::rtl::OUString const & rImplementationName,
59 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
60 rtl_ModuleCount * pModCount );
62 /** Backwards-compatibility remainder of a removed library unloading
63 feature; always set to null.
65 rtl_ModuleCount * moduleCounter;
67 /** Must be set to 0 !
68 For future extensions.
70 sal_Int32 nFlags;
73 /** Helper function for implementation of the component_writeInfo()-function.
75 @deprecated component_writeInfo should no longer be used in new components
77 @param pServiceManager The first parameter passed to component_writeInfo()-function
78 (This is an instance of the service manager, that creates the factory).
79 @param pRegistryKey The second parameter passed to the component_writeInfo()-function.
80 This is a reference to the registry key, into which the implementation
81 data shall be written to.
82 @param entries Each element of the entries-array must contains a function pointer
83 table for registering an implementation. The end of the array
84 must be marked with a 0 entry in the create-function.
85 @return sal_True, if all implementations could be registered, otherwise sal_False.
87 CPPUHELPER_DLLPUBLIC sal_Bool component_writeInfoHelper(
88 void *pServiceManager, void *pRegistryKey , const struct ImplementationEntry entries[] );
90 /** Helper function for implementation of the component_getFactory()-function,
91 that must be implemented by every shared library component.
93 @param pImplName The implementation-name to be instantiated ( This is the
94 first parameter passed to the component_getFactory
95 @param pServiceManager The second parameter passed to component_getFactory()-function
96 (This is a of the service manager, that creates the factory).
97 @param pRegistryKey The third parameter passed to the component_getFactory()-function.
98 This is a reference to the registry key, where the implementation
99 data has been written to.
100 @param entries Each element of the entries-array must contains a function pointer
101 table for creating a factor of the implementation. The end of the array
102 must be marked with a 0 entry in the create-function.
103 @return 0 if the helper failed to instantiate a factory, otherwise an acquired pointer
104 to a factory.
106 CPPUHELPER_DLLPUBLIC void *component_getFactoryHelper(
107 const char * pImplName,
108 void * pServiceManager,
109 void * pRegistryKey,
110 const struct ImplementationEntry entries[] );
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */