/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: XDatabaseAccessListener.idl,v $
 *
 *  $Revision: 1.9 $
 *
 *  last change: $Author: rt $ $Date: 2005-09-08 03:27:50 $
 *
 *  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_XDatabaseAccessListener_idl__
#define __com_sun_star_sdb_XDatabaseAccessListener_idl__

#ifndef __com_sun_star_lang_XEventListener_idl__
#include <com/sun/star/lang/XEventListener.idl>
#endif

 module com {  module sun {  module star {  module sdb {


// DocMerge from xml: interface com::sun::star::sdb::XDatabaseAccessListener
/** is used for receiving "connectionChanged", "approveConnectionClose", and
    "connectionClosing" events posted by a database access bean.


    <p>
    A database access bean setting may be changed to connect to a different database.
    In that case, the connection of the bean must be closed and a new connection must
    be established. The could affect the current data processing on the bean, as it
    could be shared by a number of components. To prevent the bean from closing it's
    connection, a DatabaseAccessListener could abort the closing.
    </p>
 */
published interface XDatabaseAccessListener: com::sun::star::lang::XEventListener
{

    // DocMerge from xml: method com::sun::star::sdb::XDatabaseAccessListener::connectionChanged
    /** indicates that a new connection for the bean has been established.
        @param evenet
            the event happend
     */
    [oneway] void connectionChanged([in]com::sun::star::lang::EventObject event);
    //-------------------------------------------------------------------------

    // DocMerge from xml: method com::sun::star::sdb::XDatabaseAccessListener::approveConnectionClosing
    /** indicates that the connection of the bean will be closed. If there are pending
        actions on the connection of the bean, "approveConnectionClosing" should return
        <FALSE/>.

        @param evenet
            the event happend
        @returns
            <TRUE/> when approved, otherwise <FALSE/>
     */
    boolean approveConnectionClosing([in]com::sun::star::lang::EventObject event);
    //-------------------------------------------------------------------------

    // DocMerge from xml: method com::sun::star::sdb::XDatabaseAccessListener::connectionClosing
    /** indicates that the connection will definitely be closed.
        @param evenet
            the event happend
     */
    [oneway] void connectionClosing([in]com::sun::star::lang::EventObject event);
};

//=============================================================================

}; }; }; };

/*===========================================================================
===========================================================================*/
#endif
