/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: DataSource.idl,v $
 *
 *  $Revision: 1.14 $
 *
 *  last change: $Author: rt $ $Date: 2005/09/08 03:14:51 $
 *
 *  The Contents of this file are made available subject to
 *  the terms of GNU Lesser General Public License Version 2.1.
 *
 *
 *    GNU Lesser General Public License Version 2.1
 *    =============================================
 *    Copyright 2005 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
 *
 ************************************************************************/
#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 { 
	 published interface XIsolatedConnection; 
	 published interface XDataSource; 
 };};};};


 module com {  module sun {  module star {  module sdb { 
 
 published interface XCompletedConnection; 
 published interface XQueryDefinitionsSupplier; 
 published 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
 */
published 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 OOo 1.1.2
	 */
	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 
