1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_sdb_DatabaseContext_idl__
28#define __com_sun_star_sdb_DatabaseContext_idl__
29
30#ifndef __com_sun_star_container_XEnumerationAccess_idl__
31#include <com/sun/star/container/XEnumerationAccess.idl>
32#endif
33
34#ifndef __com_sun_star_container_XContainer_idl__
35#include <com/sun/star/container/XContainer.idl>
36#endif
37
38#ifndef __com_sun_star_lang_XSingleServiceFactory_idl__
39#include <com/sun/star/lang/XSingleServiceFactory.idl>
40#endif
41
42#ifndef __com_sun_star_container_XNameAccess_idl__
43#include <com/sun/star/container/XNameAccess.idl>
44#endif
45
46#ifndef __com_sun_star_uno_XNamingService_idl__
47#include <com/sun/star/uno/XNamingService.idl>
48#endif
49
50 module com {  module sun {  module star {  module sdb {
51
52published interface XDatabaseRegistrations;
53
54/** is the context for accessing datasource.
55
56	<p>
57	A datasource contains information how to create a connection to a database, such as,
58	which database driver should be used, for which user should a connection be established, etc.
59	<br/>
60	The context stores datasources under a given name.
61
62	</p>
63	@see com::sun::star::sdb::DataSource
64 */
65published service DatabaseContext
66{
67	/** Enumeration on all registered data sources.
68	 */
69	interface com::sun::star::container::XEnumerationAccess;
70
71	/** NameAccess on all registered data sources.
72		<p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
73		for a <member "DataAccessDescriptor">DatabaseLocation</member>.
74		</p>
75	 */
76	interface com::sun::star::container::XNameAccess;
77
78	/** Interface for registering new datasources.
79	 */
80	interface com::sun::star::uno::XNamingService;
81
82	/** Interface for registering listener to get notified when new datasources are created or removed.
83	*/
84	interface com::sun::star::container::XContainer;
85
86	/** Interface for creation of new datasources.
87	*/
88	interface com::sun::star::lang::XSingleServiceFactory;
89
90    /** allows to access and modify the configuration data for registered data source.
91
92        <p>The main purpose of this interface is to allow you to register data sources which you know
93        by URL only, and have not yet loaded.</p>
94
95        <p>Also, it hides the details of the configuration data where the data source registrations
96        are maintained, so if possible at all, you should use this interface, instead of modifying or
97        querying the configuration data directly.</p>
98
99        @since OOo 3.3
100    */
101    [optional] interface XDatabaseRegistrations;
102};
103
104//=============================================================================
105
106}; }; }; };
107
108/*===========================================================================
109===========================================================================*/
110#endif
111