1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_sdbc_XDataSource_idl__
20 #define __com_sun_star_sdbc_XDataSource_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
26 module com
{ module sun
{ module star
{ module sdbc
{
28 published
interface XConnection
;
31 /** is used for establishing connections via a factory which is identified
32 by its name. A DataSource object is typically registered by a naming service
35 published
interface XDataSource
: com
::sun
::star
::uno
::XInterface
38 /** attempts to establish a database connection.
46 if a database access error occurs.
48 XConnection getConnection
([in]string user
, [in]string password
)
49 raises
(SQLException
);
51 /** sets the maximum time in seconds that this data source will wait
52 while attempting to connect to a database.
56 A value of zero specifies that the timeout is the default system
57 timeout if there is one; otherwise, it specifies that there is no timeout.
58 When a DataSource object is created the login timeout is initially zero.
61 the login time limit in seconds
63 if a database access error occurs.
65 void setLoginTimeout
([in]long seconds
)
66 raises
(SQLException
);
68 /** gets the maximum time in seconds that this data source can wait
69 while attempting to connect to a database.
73 A value of zero means that the timeout is the default system timeout
74 if there is one; otherwise, it means that there is no timeout. When a
75 DataSource object is created the login timeout is initially zero.
78 the login time limit in seconds
80 if a database access error occurs.
82 long getLoginTimeout
() raises
(SQLException
);
88 /*===========================================================================
89 ===========================================================================*/
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */