1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_sdb_DatabaseContext_idl__
24#define __com_sun_star_sdb_DatabaseContext_idl__
25
26#ifndef __com_sun_star_container_XEnumerationAccess_idl__
27#include <com/sun/star/container/XEnumerationAccess.idl>
28#endif
29
30#ifndef __com_sun_star_container_XContainer_idl__
31#include <com/sun/star/container/XContainer.idl>
32#endif
33
34#ifndef __com_sun_star_lang_XSingleServiceFactory_idl__
35#include <com/sun/star/lang/XSingleServiceFactory.idl>
36#endif
37
38#ifndef __com_sun_star_container_XNameAccess_idl__
39#include <com/sun/star/container/XNameAccess.idl>
40#endif
41
42#ifndef __com_sun_star_uno_XNamingService_idl__
43#include <com/sun/star/uno/XNamingService.idl>
44#endif
45
46 module com {  module sun {  module star {  module sdb {
47
48published interface XDatabaseRegistrations;
49
50/** is the context for accessing datasource.
51
52	<p>
53	A datasource contains information how to create a connection to a database, such as,
54	which database driver should be used, for which user should a connection be established, etc.
55	<br/>
56	The context stores datasources under a given name.
57
58	</p>
59	@see com::sun::star::sdb::DataSource
60 */
61published service DatabaseContext
62{
63	/** Enumeration on all registered data sources.
64	 */
65	interface com::sun::star::container::XEnumerationAccess;
66
67	/** NameAccess on all registered data sources.
68		<p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
69		for a <member "DataAccessDescriptor">DatabaseLocation</member>.
70		</p>
71	 */
72	interface com::sun::star::container::XNameAccess;
73
74	/** Interface for registering new datasources.
75	 */
76	interface com::sun::star::uno::XNamingService;
77
78	/** Interface for registering listener to get notified when new datasources are created or removed.
79	*/
80	interface com::sun::star::container::XContainer;
81
82	/** Interface for creation of new datasources.
83	*/
84	interface com::sun::star::lang::XSingleServiceFactory;
85
86    /** allows to access and modify the configuration data for registered data source.
87
88        <p>The main purpose of this interface is to allow you to register data sources which you know
89        by URL only, and have not yet loaded.</p>
90
91        <p>Also, it hides the details of the configuration data where the data source registrations
92        are maintained, so if possible at all, you should use this interface, instead of modifying or
93        querying the configuration data directly.</p>
94
95        @since OOo 3.3
96    */
97    [optional] interface XDatabaseRegistrations;
98};
99
100//=============================================================================
101
102}; }; }; };
103
104/*===========================================================================
105===========================================================================*/
106#endif
107