Kaydet (Commit) 9d74d1f7 authored tarafından Michael Stahl's avatar Michael Stahl

mysqlc: remove component_writeInfo with passive registration

Change-Id: I8ffa5ba2bbbd15533ea5097e0b018be3766ecc8b
üst 6bef95d0
......@@ -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,\
......
......@@ -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:
......@@ -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 \
))
......
# -*- 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:
......@@ -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>
<?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>
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment