2001-02-05 11:27:45 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* $RCSfile: TConnection.hxx,v $
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* $Revision: 1.11 $
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* last change: $Author: rt $ $Date: 2005-09-08 06:38:56 $
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* 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.
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* 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.
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
2005-09-08 05:38:56 +00:00
|
|
|
* 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
|
2001-02-05 11:27:45 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef CONNECTIVITY_CONNECTION_HXX
|
|
|
|
#define CONNECTIVITY_CONNECTION_HXX
|
|
|
|
|
|
|
|
#ifndef _RTL_TEXTENC_H
|
|
|
|
#include <rtl/textenc.h>
|
|
|
|
#endif
|
2001-09-27 12:48:37 +00:00
|
|
|
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
|
|
|
|
#include <com/sun/star/lang/DisposedException.hpp>
|
|
|
|
#endif
|
2001-04-27 09:08:14 +00:00
|
|
|
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
|
|
|
|
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
|
|
|
|
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
|
|
|
|
#include <com/sun/star/sdbc/XConnection.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _CPPUHELPER_COMPBASE4_HXX_
|
|
|
|
#include <cppuhelper/compbase4.hxx>
|
|
|
|
#endif
|
2001-05-14 10:42:44 +00:00
|
|
|
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
|
|
|
|
#include "propertyids.hxx"
|
|
|
|
#endif
|
2001-05-18 07:33:49 +00:00
|
|
|
#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
|
|
|
|
#include "connectivity/CommonTools.hxx"
|
|
|
|
#endif
|
2001-04-27 09:08:14 +00:00
|
|
|
|
2001-02-05 11:27:45 +00:00
|
|
|
|
|
|
|
namespace connectivity
|
|
|
|
{
|
2001-04-27 09:08:14 +00:00
|
|
|
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XConnection,
|
|
|
|
::com::sun::star::sdbc::XWarningsSupplier,
|
|
|
|
::com::sun::star::lang::XServiceInfo,
|
|
|
|
::com::sun::star::lang::XUnoTunnel
|
|
|
|
> OMetaConnection_BASE;
|
|
|
|
|
2004-08-02 16:11:01 +00:00
|
|
|
class OMetaConnection : public OMetaConnection_BASE
|
2001-02-05 11:27:45 +00:00
|
|
|
{
|
|
|
|
protected:
|
2001-04-27 09:08:14 +00:00
|
|
|
::osl::Mutex m_aMutex;
|
2002-10-25 08:07:25 +00:00
|
|
|
::rtl::OUString m_sURL;
|
2001-04-27 09:08:14 +00:00
|
|
|
rtl_TextEncoding m_nTextEncoding; // the encoding which is used for all text conversions
|
2001-02-05 11:27:45 +00:00
|
|
|
public:
|
2001-05-14 10:42:44 +00:00
|
|
|
|
|
|
|
static ::dbtools::OPropertyMap& getPropMap();
|
|
|
|
|
2001-04-27 09:08:14 +00:00
|
|
|
OMetaConnection() : OMetaConnection_BASE(m_aMutex) ,m_nTextEncoding(RTL_TEXTENCODING_MS_1252){}
|
2001-02-05 11:27:45 +00:00
|
|
|
|
2001-08-24 05:19:41 +00:00
|
|
|
inline rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
|
2002-10-25 08:07:25 +00:00
|
|
|
inline ::rtl::OUString getURL() const { return m_sURL; }
|
|
|
|
inline void setURL(const ::rtl::OUString& _rsUrl) { m_sURL = _rsUrl; }
|
2001-04-27 09:08:14 +00:00
|
|
|
|
|
|
|
//XUnoTunnel
|
|
|
|
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
|
|
|
|
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
|
2001-02-05 11:27:45 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // CONNECTIVITY_CONNECTION_HXX
|
|
|
|
|
|
|
|
|