/*************************************************************************
 *
 *  $RCSfile: DataSource.idl,v $
 *
 *  $Revision: 1.11 $
 *
 *  last change: $Author: mi $ $Date: 2002/10/03 13:06:29 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (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.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/
#ifndef __com_sun_star_sdb_DataSource_idl__ 
#define __com_sun_star_sdb_DataSource_idl__ 
 
#ifndef __com_sun_star_io_XPersistObject_idl__ 
#include <com/sun/star/io/XPersistObject.idl> 
#endif 
 
#ifndef __com_sun_star_beans_XPropertySet_idl__ 
#include <com/sun/star/beans/XPropertySet.idl> 
#endif 
 
#ifndef __com_sun_star_beans_PropertyValue_idl__ 
#include <com/sun/star/beans/PropertyValue.idl> 
#endif 
 
#ifndef __com_sun_star_util_XFlushable_idl__ 
#include <com/sun/star/util/XFlushable.idl> 
#endif 
 
#ifndef __com_sun_star_util_XNumberFormatsSupplier_idl__ 
#include <com/sun/star/util/XNumberFormatsSupplier.idl> 
#endif 
 

 module com {  module sun {  module star {  module sdbc { 
	interface XIsolatedConnection; 
	interface XDataSource; 
 };};};};


 module com {  module sun {  module star {  module sdb { 
 
interface XCompletedConnection; 
interface XQueryDefinitionsSupplier; 
interface XBookmarksSupplier;

 
/** is a factory to establish database connections. It should be registered at
	a <type scope="com::sun::star::uno">NamingService</type>.
	@see com::sun::star::sdb::DatabaseContext
 */
service DataSource
{ 
	interface com::sun::star::beans::XPropertySet; 
 
	 
	/** useful for establishing connections with the completion of connection parameters 
				provided during user interaction.
	 */
	interface XCompletedConnection; 

	/** useful for establishing isolated connections which are not shared among others 
		as it is the case when using <type>XCompletedConnection</type> or <type scope="com::sun::star::sdbc">XDataSource</type>.
		@see XCompletedConnection
		@see com::sun::star::sdbc::XDataSource
		@since #101798#
	 */
	interface com::sun::star::sdbc::XIsolatedConnection; 
 
	 
	/** is provided to flush a DataSource within to a Database Context.
	 */
	interface com::sun::star::util::XFlushable; 
 
	 
	/** provides the access to DataSource related queries.
		<p>
		The object returned by the 
		<method scope="com::sun::star::sdb">XQueryDefinitionsSupplier::getQueryDefinitions()</method>
		supports the
		<service scope="com::sun::star::sdb">DefinitionContainer</service>
		service.
		</p>
	 */
	interface XQueryDefinitionsSupplier; 

	/* useful for establishing connections and to get and set the login timeout.
	*/
	interface com::sun::star::sdbc::XDataSource; 
 
	/** provides access to bookmarks to documents associated with the data source
		<p>
		The object returned by the 
		<method scope="com::sun::star::sdb">XBookmarksSupplier::getBookmarks()</method>
		supports the
		<service scope="com::sun::star::sdb">DefinitionContainer</service>
		service.
		</p>
	 */
	[optional] interface XBookmarksSupplier;

	/** is the name of the data source.
	 */
	[readonly, property] string Name; 
 
	 
	/** indicates a database url of the form <br>
		<code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
		or
		<code>sdbc:<em>subprotocol</em>:<em>subname</em></code>
	 */
	[property] string URL; 
 
	 
	/** is a list of arbitrary string tag/value pairs as 
		     connection arguments; normally at least a "user" and 
		     "password" property should be included.
	 */
	[property] sequence<com::sun::star::beans::PropertyValue> Info; 
 
	 
	/** determines a users login name.
	 */
	[property] string User; 
 
	 
	/** determines a users password. The password is not persistent.
	 */
	[property] string Password; 
 
	 
	/** indicates that a password is always necessary.
	 */
	[property] boolean IsPasswordRequired; 
 
	 
	/** indicates that components displaying data obtained from this 
		data source should suppress columns used for versioning.
	 */
	[property] boolean SuppressVersionColumns; 
 
	 
	/** determines whether modifications on the data source are allowed or not.
	 */
	[readonly, property] boolean IsReadOnly; 
 
	 
	/** provides an object for formatting numbers.
	 */
	[readonly, property] com::sun::star::util::XNumberFormatsSupplier 
						NumberFormatsSupplier; 
 
	 
	/** defines a list of tables, on which the DataSource should have it's focus. 
		If empty, all tables are rejected.
	 
	*/
	[property] sequence<string> TableFilter; 
 
	 
	/** defines a list of table types, on which the DataSource should have it's focus. 
			 If empty, all table types are rejected.

	*/
	[property] sequence<string> TableTypeFilter; 
}; 
 
//============================================================================= 
 
}; }; }; }; 
 
#endif 
