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/source | |
parent | 6bef95d0da47edf33f4c3fe3c7380977f8c1cf67 (diff) |
mysqlc: remove component_writeInfo with passive registration
Change-Id: I8ffa5ba2bbbd15533ea5097e0b018be3766ecc8b
Diffstat (limited to 'mysqlc/source')
-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 |
3 files changed, 17 insertions, 50 deletions
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, |