summaryrefslogtreecommitdiff
path: root/include/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-19 08:48:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-19 08:48:56 +0100
commitae3a0c8da50b36db395984637f5ad74d3b4887bc (patch)
treec4936b9fba1f24d412d41474ebef44a5f094dbc8 /include/osl
parent80d977b896904a0261d32857469c1b3e7516ca1e (diff)
Add .component <implementation constructor="..." feature
...to directly call constructor functions of ComponentContext-based C++ implementations of (non-single-instance) UNO services. The case where these calls would need to be bridged across different environments (e.g., from gcc3 to gcc3:affine) is not yet implemented. bootstrap.component and expwrap.component are adapted accordingly as a proof-of- concept (which had previously been adapted to use the prefix="direct" feature, which may become unnecessary again in the end, depending on how to handle single-instance services/singletons). More to follow. Change-Id: I18682d75bcd29d3d427e31331b4ce8161dbb846d
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/detail/component-mapping.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/include/osl/detail/component-mapping.h b/include/osl/detail/component-mapping.h
index 9feae7000160..df00726a4e52 100644
--- a/include/osl/detail/component-mapping.h
+++ b/include/osl/detail/component-mapping.h
@@ -29,16 +29,21 @@ extern "C" {
typedef struct {
const char *name;
void * (*component_getFactory_function)(const char *, void *, void *);
-} lib_to_component_mapping;
+} lib_to_factory_mapping;
-const lib_to_component_mapping *lo_get_library_map(void);
-const lib_to_component_mapping *lo_get_implementation_map(void);
+typedef struct {
+ const char *name;
+ void * (*constructor_function)(void *, void *);
+} lib_to_constructor_mapping;
+
+const lib_to_factory_mapping *lo_get_factory_map(void);
+const lib_to_constructor_mapping *lo_get_constructor_map(void);
#ifdef __cplusplus
}
#endif
-#define NON_APP_SPECIFIC_COMPONENT_MAP \
+#define NON_APP_SPECIFIC_FACTORY_MAP \
{ "libintrospectionlo.a", introspection_component_getFactory }, \
{ "libreflectionlo.a", reflection_component_getFactory }, \
{ "libstocserviceslo.a", stocservices_component_getFactory }, \
@@ -60,19 +65,19 @@ const lib_to_component_mapping *lo_get_implementation_map(void);
{ "libvcllo.a", vcl_component_getFactory }, \
{ "libxstor.a", xstor_component_getFactory }, \
-#define NON_APP_SPECIFIC_DIRECT_COMPONENT_MAP \
- { "com.sun.star.comp.extensions.xml.sax.ParserExpat", com_sun_star_comp_extensions_xml_sax_ParserExpat_component_getFactory }, \
- { "com.sun.star.comp.extensions.xml.sax.FastParser", com_sun_star_comp_extensions_xml_sax_FastParser_component_getFactory }, \
- { "com.sun.star.comp.stoc.DLLComponentLoader.component.getFactory", com_sun_star_comp_stoc_DLLComponentLoader_component_getFactory }, \
- { "com.sun.star.comp.stoc.ImplementationRegistration.component.getFactory", com_sun_star_comp_stoc_ImplementationRegistration_component_getFactory }, \
- { "com.sun.star.comp.stoc.NestedRegistry.component.getFactory", com_sun_star_comp_stoc_NestedRegistry_component_getFactory }, \
- { "com.sun.star.comp.stoc.ORegistryServiceManager.component.getFactory", com_sun_star_comp_stoc_ORegistryServiceManager_component_getFactory }, \
- { "com.sun.star.comp.stoc.OServiceManager.component.getFactory", com_sun_star_comp_stoc_OServiceManager_component_getFactory }, \
- { "com.sun.star.comp.stoc.OServiceManagerWrapper.component.getFactory", com_sun_star_comp_stoc_OServiceManagerWrapper_component_getFactory }, \
- { "com.sun.star.comp.stoc.SimpleRegistry.component.getFactory", com_sun_star_comp_stoc_SimpleRegistry_component_getFactory }, \
- { "com.sun.star.extensions.xml.sax.Writer", com_sun_star_extensions_xml_sax_Writer_component_getFactory }, \
- { "com.sun.star.security.comp.stoc.AccessController.component.getFactory", com_sun_star_security_comp_stoc_AccessController_component_getFactory }, \
- { "com.sun.star.security.comp.stoc.FilePolicy.component.getFactory", com_sun_star_security_comp_stoc_FilePolicy_component_getFactory }, \
+#define NON_APP_SPECIFIC_CONSTRUCTOR_MAP \
+ { "com_sun_star_comp_extensions_xml_sax_ParserExpat", com_sun_star_comp_extensions_xml_sax_ParserExpat }, \
+ { "com_sun_star_comp_extensions_xml_sax_FastParser", com_sun_star_comp_extensions_xml_sax_FastParser }, \
+ { "com_sun_star_comp_stoc_DLLComponentLoader", com_sun_star_comp_stoc_DLLComponentLoader }, \
+ { "com_sun_star_comp_stoc_ImplementationRegistration", com_sun_star_comp_stoc_ImplementationRegistration }, \
+ { "com_sun_star_comp_stoc_NestedRegistry", com_sun_star_comp_stoc_NestedRegistry }, \
+ { "com_sun_star_comp_stoc_ORegistryServiceManager", com_sun_star_comp_stoc_ORegistryServiceManager }, \
+ { "com_sun_star_comp_stoc_OServiceManager", com_sun_star_comp_stoc_OServiceManager }, \
+ { "com_sun_star_comp_stoc_OServiceManagerWrapper", com_sun_star_comp_stoc_OServiceManagerWrapper }, \
+ { "com_sun_star_comp_stoc_SimpleRegistry", com_sun_star_comp_stoc_SimpleRegistry }, \
+ { "com_sun_star_extensions_xml_sax_Writer", com_sun_star_extensions_xml_sax_Writer }, \
+ { "com_sun_star_security_comp_stoc_AccessController", com_sun_star_security_comp_stoc_AccessController }, \
+ { "com_sun_star_security_comp_stoc_FilePolicy", com_sun_star_security_comp_stoc_FilePolicy }, \
#endif /* DISABLE_DYNLOADING */