update dev300-m58
[ooovba.git] / connectivity / source / inc / flat / EConnection.hxx
blob92330eb259913f6d5cc377caafae21ebdce97b4f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: EConnection.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CONNECTIVITY_FLAT_ECONNECTION_HXX_
32 #define _CONNECTIVITY_FLAT_ECONNECTION_HXX_
34 #include "file/FConnection.hxx"
36 namespace connectivity
38 namespace flat
40 class ODriver;
41 class OFlatConnection : public file::OConnection
43 private:
44 sal_Bool m_bHeaderLine; // column names in first row
45 sal_Unicode m_cFieldDelimiter; // look at the name
46 sal_Unicode m_cStringDelimiter; // delimiter for strings m_cStringDelimiter blabla m_cStringDelimiter
47 sal_Unicode m_cDecimalDelimiter; // Dezimal-delimiter (Dezimalpoint)
48 sal_Unicode m_cThousandDelimiter; //
49 public:
50 OFlatConnection(ODriver* _pDriver);
51 virtual ~OFlatConnection();
53 virtual void construct(const ::rtl::OUString& _rUrl,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo ) throw( ::com::sun::star::sdbc::SQLException);
55 // own methods
56 inline sal_Bool isHeaderLine() const { return m_bHeaderLine; }
57 inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; }
58 inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; }
59 inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; }
60 inline sal_Unicode getThousandDelimiter() const { return m_cThousandDelimiter;}
61 // XServiceInfo
62 DECLARE_SERVICE_INFO();
64 // XConnection
65 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
67 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
68 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
69 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
73 #endif // _CONNECTIVITY_FLAT_DCONNECTION_HXX_