bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / flat / EConnection.hxx
blob1d3854f3bea0c01f2e543eb5501bd5ae749ef745
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_FLAT_ECONNECTION_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_FLAT_ECONNECTION_HXX
23 #include "file/FConnection.hxx"
25 namespace connectivity
27 namespace flat
29 class ODriver;
30 class OFlatConnection : public file::OConnection
32 private:
33 sal_Int32 m_nMaxRowsToScan;
34 bool m_bHeaderLine; // column names in first row
35 sal_Unicode m_cFieldDelimiter; // look at the name
36 sal_Unicode m_cStringDelimiter;
37 sal_Unicode m_cDecimalDelimiter;
38 sal_Unicode m_cThousandDelimiter;
39 public:
40 OFlatConnection(ODriver* _pDriver);
41 virtual ~OFlatConnection();
43 virtual void construct(const OUString& _rUrl,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo ) throw(css::sdbc::SQLException, css::uno::RuntimeException) SAL_OVERRIDE;
45 // own methods
46 inline bool isHeaderLine() const { return m_bHeaderLine; }
47 inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; }
48 inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; }
49 inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; }
50 inline sal_Unicode getThousandDelimiter() const { return m_cThousandDelimiter;}
51 inline sal_Int32 getMaxRowsToScan() const { return m_nMaxRowsToScan;}
52 // XServiceInfo
53 DECLARE_SERVICE_INFO();
55 // XConnection
56 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, std::exception) SAL_OVERRIDE;
57 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog() SAL_OVERRIDE;
58 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, std::exception) SAL_OVERRIDE;
59 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 #endif // _CONNECTIVITY_FLAT_DCONNECTION_HXX_
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */