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_sdbc_XDataSource_idl__ 28#define __com_sun_star_sdbc_XDataSource_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_sdbc_SQLException_idl__ 35#include <com/sun/star/sdbc/SQLException.idl> 36#endif 37 38 module com { module sun { module star { module sdbc { 39 40 published interface XConnection; 41 42 43/** is used for establishing connections via a factory which is identified 44 by its name. A DataSource object is typically registered by a naming service 45 provider. 46 */ 47published interface XDataSource: com::sun::star::uno::XInterface 48{ 49 //------------------------------------------------------------------------- 50 51 /** attempts to establish a database connection. 52 @param user 53 the user name 54 @param password 55 the password 56 @returns 57 the connection object 58 @throws SQLException 59 if a database access error occurs. 60 */ 61 XConnection getConnection([in]string user, [in]string password) 62 raises (SQLException); 63 //------------------------------------------------------------------------- 64 65 /** sets the maximum time in seconds that this data source will wait 66 while attempting to connect to a database. 67 68 69 <p> 70 A value of zero specifies that the timeout is the default system 71 timeout if there is one; otherwise, it specifies that there is no timeout. 72 When a DataSource object is created the login timeout is initially zero. 73 </p> 74 @param seconds 75 the login time limit in seconds 76 @throws SQLException 77 if a database access error occurs. 78 */ 79 void setLoginTimeout([in]long seconds) 80 raises (SQLException); 81 //------------------------------------------------------------------------- 82 83 /** gets the maximum time in seconds that this data source can wait 84 while attempting to connect to a database. 85 86 87 <p> 88 A value of zero means that the timeout is the default system timeout 89 if there is one; otherwise, it means that there is no timeout. When a 90 DataSource object is created the login timeout is initially zero. 91 </p> 92 @returns 93 the login time limit in seconds 94 @throws SQLException 95 if a database access error occurs. 96 */ 97 long getLoginTimeout() raises (SQLException); 98}; 99 100//============================================================================= 101 102}; }; }; }; 103 104/*=========================================================================== 105===========================================================================*/ 106#endif 107