xref: /trunk/main/offapi/com/sun/star/sdbc/XIsolatedConnection.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_XIsolatedConnection_idl__
24cdf0e10cSrcweir#define __com_sun_star_sdbc_XIsolatedConnection_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_task_XInteractionHandler_idl__
27cdf0e10cSrcweir#include <com/sun/star/task/XInteractionHandler.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_SQLException_idl__
31cdf0e10cSrcweir#include <com/sun/star/sdbc/SQLException.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir module com {  module sun {  module star {  module sdbc {
35cdf0e10cSrcweir
36cdf0e10cSrcweir published interface XConnection;
37cdf0e10cSrcweir/** is used for establishing isolated connections via a factory.
38cdf0e10cSrcweir    <p>
39cdf0e10cSrcweir    The <type>XIsolatedConnection</type> allows to create connections which are not shared among others
40cdf0e10cSrcweir    as it is the case when creating connections in normal way.
41cdf0e10cSrcweir    </p>
42cdf0e10cSrcweir    @see com::sun::star::sdb::DataSource
43*96af39f7SJürgen Schmidt    @since OpenOffice 1.1.2
44cdf0e10cSrcweir */
45cdf0e10cSrcweirpublished interface XIsolatedConnection: com::sun::star::uno::XInterface
46cdf0e10cSrcweir{
47cdf0e10cSrcweir    /** attempts to establish a database connection.
48cdf0e10cSrcweir        <p>If information is missing, such as
49cdf0e10cSrcweir        a user's password, they are completed by user interaction.</p>
50cdf0e10cSrcweir        @param handler
51cdf0e10cSrcweir            The handler which ask for the needed information when they are missing.
52cdf0e10cSrcweir        @returns
53cdf0e10cSrcweir            A connection which is not shared.
54cdf0e10cSrcweir        @throws com::sun::star::sdbc::SQLException
55cdf0e10cSrcweir            when an error occurs.
56cdf0e10cSrcweir     */
57cdf0e10cSrcweir    XConnection
58cdf0e10cSrcweir        getIsolatedConnectionWithCompletion([in]com::sun::star::task::XInteractionHandler handler)
59cdf0e10cSrcweir            raises (SQLException);
60cdf0e10cSrcweir
61cdf0e10cSrcweir    /** attempts to establish a database connection.
62cdf0e10cSrcweir        @param user
63cdf0e10cSrcweir            The user name.
64cdf0e10cSrcweir        @param password
65cdf0e10cSrcweir            The password.
66cdf0e10cSrcweir        @returns
67cdf0e10cSrcweir            A connection which is not shared.
68cdf0e10cSrcweir        @throws com::sun::star::sdbc::SQLException
69cdf0e10cSrcweir            when an error occurs.
70cdf0e10cSrcweir     */
71cdf0e10cSrcweir    XConnection getIsolatedConnection([in]string user, [in]string password)
72cdf0e10cSrcweir        raises (SQLException);
73cdf0e10cSrcweir};
74cdf0e10cSrcweir
75cdf0e10cSrcweir//=============================================================================
76cdf0e10cSrcweir
77cdf0e10cSrcweir}; }; }; };
78cdf0e10cSrcweir
79cdf0e10cSrcweir/*===========================================================================
80cdf0e10cSrcweir===========================================================================*/
81cdf0e10cSrcweir#endif
82