diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-07 12:45:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-07 14:36:25 +0100 |
commit | 9d74d1f7c1e0588540e2b6c8408aacdc5ca59d7b (patch) | |
tree | ec9c4f7a2eaa1c2ff5d61cbabce86368a70c6cf7 /mysqlc | |
parent | 6bef95d0da47edf33f4c3fe3c7380977f8c1cf67 (diff) |
mysqlc: remove component_writeInfo with passive registration
Change-Id: I8ffa5ba2bbbd15533ea5097e0b018be3766ecc8b
Diffstat (limited to 'mysqlc')
-rw-r--r-- | mysqlc/Extension_mysql-connector-ooo.mk | 2 | ||||
-rw-r--r-- | mysqlc/Library_mysqlc.mk | 2 | ||||
-rw-r--r-- | mysqlc/Module_mysqlc.mk | 1 | ||||
-rw-r--r-- | mysqlc/Rdb_mysqlc.mk | 16 | ||||
-rw-r--r-- | mysqlc/source/META-INF/manifest.xml | 4 | ||||
-rw-r--r-- | mysqlc/source/mysqlc.component | 15 | ||||
-rw-r--r-- | mysqlc/source/mysqlc_services.cxx | 48 |
7 files changed, 38 insertions, 50 deletions
diff --git a/mysqlc/Extension_mysql-connector-ooo.mk b/mysqlc/Extension_mysql-connector-ooo.mk index 23e769f97f64..ad94a2f33def 100644 --- a/mysqlc/Extension_mysql-connector-ooo.mk +++ b/mysqlc/Extension_mysql-connector-ooo.mk @@ -11,6 +11,8 @@ $(eval $(call gb_Extension_Extension,mysql-connector-ooo,mysqlc/source)) $(eval $(call gb_Extension_add_library,mysql-connector-ooo,mysqlc)) +$(eval $(call gb_Extension_add_file,mysql-connector-ooo,components.rdb,$(call gb_Rdb_get_target,mysqlc))) + $(eval $(call gb_Extension_add_file,mysql-connector-ooo,registry/data/org/openoffice/Office/DataAccess/Drivers.xcu,$(call gb_XcuFile_for_extension,mysqlc/source/registry/data/org/openoffice/Office/DataAccess/Drivers.xcu))) $(eval $(call gb_Extension_add_files,mysql-connector-ooo,images,\ diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk index edcc36639350..246e4ec87b1c 100644 --- a/mysqlc/Library_mysqlc.mk +++ b/mysqlc/Library_mysqlc.mk @@ -61,4 +61,6 @@ $(eval $(call gb_Library_add_exception_objects,mysqlc,\ mysqlc/source/mysqlc_propertyids \ )) +$(eval $(call gb_Library_set_componentfile,mysqlc,mysqlc/source/mysqlc)) + # vim: set noet sw=4 ts=4: diff --git a/mysqlc/Module_mysqlc.mk b/mysqlc/Module_mysqlc.mk index f4fa114642b7..6a605beaea60 100644 --- a/mysqlc/Module_mysqlc.mk +++ b/mysqlc/Module_mysqlc.mk @@ -14,6 +14,7 @@ ifeq ($(ENABLE_MYSQLC),YES) $(eval $(call gb_Module_add_targets,mysqlc,\ Configuration_mysql \ Library_mysqlc \ + Rdb_mysqlc \ Extension_mysql-connector-ooo \ )) diff --git a/mysqlc/Rdb_mysqlc.mk b/mysqlc/Rdb_mysqlc.mk new file mode 100644 index 000000000000..bbcde68a3870 --- /dev/null +++ b/mysqlc/Rdb_mysqlc.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Rdb_Rdb,mysqlc)) + +$(eval $(call gb_Rdb_add_components,mysqlc,\ + mysqlc/source/mysqlc \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/mysqlc/source/META-INF/manifest.xml b/mysqlc/source/META-INF/manifest.xml index 2a54d8410b66..b3a94aca14c1 100644 --- a/mysqlc/source/META-INF/manifest.xml +++ b/mysqlc/source/META-INF/manifest.xml @@ -18,8 +18,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> <manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> - <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native" - manifest:full-path="mysqlc.uno@SHARED_EXTENSION@"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@" + manifest:full-path="components.rdb"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/DataAccess/Drivers.xcu"/> </manifest:manifest> diff --git a/mysqlc/source/mysqlc.component b/mysqlc/source/mysqlc.component new file mode 100644 index 000000000000..e4295110f84b --- /dev/null +++ b/mysqlc/source/mysqlc.component @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * +--> +<component xmlns="http://openoffice.org/2010/uno-components" + loader="com.sun.star.loader.SharedLibrary"> + <implementation name="com.sun.star.comp.sdbc.mysqlc.MysqlCDriver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/mysqlc/source/mysqlc_services.cxx b/mysqlc/source/mysqlc_services.cxx index 47a5ffdbb801..8f3add7213de 100644 --- a/mysqlc/source/mysqlc_services.cxx +++ b/mysqlc/source/mysqlc_services.cxx @@ -40,33 +40,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); -//*************************************************************************************** -// -// Die vorgeschriebene C-API muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< XRegistryKey > & xKey) -{ - ::rtl::OUStringBuffer aMainKeyName; - aMainKeyName.append( sal_Unicode( '/' ) ); - aMainKeyName.append( aServiceImplName ); - aMainKeyName.appendAscii( "/UNO/SERVICES" ); - - Reference< XRegistryKey > xNewKey( xKey->createKey( aMainKeyName.makeStringAndClear() ) ); - OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i = 0; i < Services.getLength(); ++i) { - xNewKey->createKey(Services[i]); - } -} - - -//--------------------------------------------------------------------------------------- struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -103,27 +76,6 @@ struct ProviderRequest /* }}} */ -/* {{{ component_writeInfo -I- */ -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * /* pServiceManager */, void * pRegistryKey) -{ - if (pRegistryKey) { - try { - Reference< XRegistryKey > xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - MysqlCDriver::getImplementationName_Static(), - MysqlCDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } catch (::com::sun::star::registry::InvalidRegistryException& ) { - OSL_FAIL("SKELETON::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - } - return sal_False; -} -/* }}} */ - - /* {{{ component_getFactory -I- */ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplementationName, |