summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-18 09:46:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-27 15:03:32 +0200
commit9c00e38b431b57c3760f6c0aa774424b3239eeda (patch)
treebfe1bdd57d15eafb617028243cf4ea892016a137 /offapi
parent8c20367a2e6d61f830f6dc336761909e38a6bcca (diff)
fdo#46808, Adapt sdb::DatabaseContext UNO service to new style
Create a merged XDatabaseContext interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Quite a few IDL files had to be marked as published for this to work. Change-Id: Ie9a0da88d8c33cc83fc9d2334ff83ab2744c222f
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk3
-rw-r--r--offapi/com/sun/star/sdb/DatabaseContext.idl56
-rw-r--r--offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl2
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseContext.idl78
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrations.idl4
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl2
-rw-r--r--offapi/type_reference/types.rdbbin7655424 -> 7655424 bytes
7 files changed, 87 insertions, 58 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index a9451c830e90..104d76c34115 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -235,6 +235,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/script/vba
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb,\
DataAccessDescriptorFactory \
+ DatabaseContext \
DatabaseInteractionHandler \
InteractionHandler \
))
@@ -973,7 +974,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/sdb,\
DatabaseAccessConnection \
DatabaseAccessContext \
DatabaseAccessDataSource \
- DatabaseContext \
DatabaseDocument \
DatabaseEnvironment \
DatasourceAdministrationDialog \
@@ -3092,6 +3092,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/sdb,\
XDataAccessDescriptorFactory \
XDatabaseAccess \
XDatabaseAccessListener \
+ XDatabaseContext \
XDatabaseEnvironment \
XDatabaseRegistrations \
XDatabaseRegistrationsListener \
diff --git a/offapi/com/sun/star/sdb/DatabaseContext.idl b/offapi/com/sun/star/sdb/DatabaseContext.idl
index 52ddc1c0a924..fee353634067 100644
--- a/offapi/com/sun/star/sdb/DatabaseContext.idl
+++ b/offapi/com/sun/star/sdb/DatabaseContext.idl
@@ -19,19 +19,9 @@
#ifndef __com_sun_star_sdb_DatabaseContext_idl__
#define __com_sun_star_sdb_DatabaseContext_idl__
-#include <com/sun/star/container/XEnumerationAccess.idl>
+#include <com/sun/star/sdb/XDatabaseContext.idl>
-#include <com/sun/star/container/XContainer.idl>
-
-#include <com/sun/star/lang/XSingleServiceFactory.idl>
-
-#include <com/sun/star/container/XNameAccess.idl>
-
-#include <com/sun/star/uno/XNamingService.idl>
-
- module com { module sun { module star { module sdb {
-
-published interface XDatabaseRegistrations;
+module com { module sun { module star { module sdb {
/** is the context for accessing datasource.
@@ -44,50 +34,10 @@ published interface XDatabaseRegistrations;
</p>
@see com::sun::star::sdb::DataSource
*/
-published service DatabaseContext
-{
- /** Enumeration on all registered data sources.
- */
- interface com::sun::star::container::XEnumerationAccess;
-
- /** NameAccess on all registered data sources.
- <p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
- for a <member "DataAccessDescriptor">DatabaseLocation</member>.
- </p>
- */
- interface com::sun::star::container::XNameAccess;
-
- /** Interface for registering new datasources.
- */
- interface com::sun::star::uno::XNamingService;
-
- /** Interface for registering listener to get notified when new datasources are created or removed.
- */
- interface com::sun::star::container::XContainer;
-
- /** Interface for creation of new datasources.
- */
- interface com::sun::star::lang::XSingleServiceFactory;
-
- /** allows to access and modify the configuration data for registered data source.
-
- <p>The main purpose of this interface is to allow you to register data sources which you know
- by URL only, and have not yet loaded.</p>
-
- <p>Also, it hides the details of the configuration data where the data source registrations
- are maintained, so if possible at all, you should use this interface, instead of modifying or
- querying the configuration data directly.</p>
-
- @since OOo 3.3
- */
- [optional] interface XDatabaseRegistrations;
-};
-
+published service DatabaseContext : XDatabaseContext;
}; }; }; };
-/*===========================================================================
-===========================================================================*/
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
index 29678a2ccf10..7b606cf6864b 100644
--- a/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
+++ b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
@@ -33,7 +33,7 @@ module com { module sun { module star { module sdb {
@since OpenOffice.org 3.3
*/
-struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject
+published struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject
{
/// is the name of the database registration affected by the event
string Name;
diff --git a/offapi/com/sun/star/sdb/XDatabaseContext.idl b/offapi/com/sun/star/sdb/XDatabaseContext.idl
new file mode 100644
index 000000000000..9c0394215278
--- /dev/null
+++ b/offapi/com/sun/star/sdb/XDatabaseContext.idl
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_sdb_XDatabaseContext_idl__
+#define __com_sun_star_sdb_XDatabaseContext_idl__
+
+#include <com/sun/star/container/XEnumerationAccess.idl>
+#include <com/sun/star/container/XContainer.idl>
+#include <com/sun/star/lang/XSingleServiceFactory.idl>
+#include <com/sun/star/container/XNameAccess.idl>
+#include <com/sun/star/uno/XNamingService.idl>
+#include <com/sun/star/sdb/XDatabaseRegistrations.idl>
+
+module com { module sun { module star { module sdb {
+
+/**
+ Provides an interface for the new-style DatabaseContext service to implement.
+ */
+published interface XDatabaseContext
+{
+ /** Enumeration on all registered data sources.
+ */
+ interface com::sun::star::container::XEnumerationAccess;
+
+ /** NameAccess on all registered data sources.
+ <p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
+ for a <member "DataAccessDescriptor">DatabaseLocation</member>.
+ </p>
+ */
+ interface com::sun::star::container::XNameAccess;
+
+ /** Interface for registering new datasources.
+ */
+ interface com::sun::star::uno::XNamingService;
+
+ /** Interface for registering listener to get notified when new datasources are created or removed.
+ */
+ interface com::sun::star::container::XContainer;
+
+ /** Interface for creation of new datasources.
+ */
+ interface com::sun::star::lang::XSingleServiceFactory;
+
+ /** allows to access and modify the configuration data for registered data source.
+
+ <p>The main purpose of this interface is to allow you to register data sources which you know
+ by URL only, and have not yet loaded.</p>
+
+ <p>Also, it hides the details of the configuration data where the data source registrations
+ are maintained, so if possible at all, you should use this interface, instead of modifying or
+ querying the configuration data directly.</p>
+
+ @since OOo 3.3
+ */
+ [optional] interface XDatabaseRegistrations;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
index 3ca15502a505..105264277a28 100644
--- a/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
+++ b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
@@ -28,7 +28,7 @@
module com { module sun { module star { module sdb {
-interface XDatabaseRegistrationsListener;
+published interface XDatabaseRegistrationsListener;
/** provides access to the application-wide registered databases.
@@ -40,7 +40,7 @@ interface XDatabaseRegistrationsListener;
@since OOo 3.3
*/
-interface XDatabaseRegistrations
+published interface XDatabaseRegistrations
{
/** determines whether a database is registered under the given name.
diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
index 1f502fde5ba4..7e4b8afb94b5 100644
--- a/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
+++ b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
@@ -34,7 +34,7 @@ module com { module sun { module star { module sdb {
@since OOo 3.3
*/
-interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener
+published interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener
{
/** called when a database has been registered
*/
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index c0d725b57da4..312d0eb217cc 100644
--- a/offapi/type_reference/types.rdb
+++ b/offapi/type_reference/types.rdb
Binary files differ