merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sdbc / XDataSource.idl
blob2c2f4f13323ebb797267d93520c1e7d752b844e4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_XDataSource_idl__
28 #define __com_sun_star_sdbc_XDataSource_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_sdbc_SQLException_idl__
35 #include <com/sun/star/sdbc/SQLException.idl>
36 #endif
38 module com { module sun { module star { module sdbc {
40 published interface XConnection;
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.
47 published interface XDataSource: com::sun::star::uno::XInterface
49 //-------------------------------------------------------------------------
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.
61 XConnection getConnection([in]string user, [in]string password)
62 raises (SQLException);
63 //-------------------------------------------------------------------------
65 /** sets the maximum time in seconds that this data source will wait
66 while attempting to connect to a database.
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.
79 void setLoginTimeout([in]long seconds)
80 raises (SQLException);
81 //-------------------------------------------------------------------------
83 /** gets the maximum time in seconds that this data source can wait
84 while attempting to connect to a database.
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.
97 long getLoginTimeout() raises (SQLException);
100 //=============================================================================
102 }; }; }; };
104 /*===========================================================================
105 ===========================================================================*/
106 #endif