LibreOffice Module connectivity (master) 1
NConnection.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "NDriver.hxx"
23#include <com/sun/star/sdbc/SQLWarning.hpp>
24#include <com/sun/star/beans/PropertyValue.hpp>
25#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
28#include <TConnection.hxx>
30#include <osl/module.h>
31#include "EApi.h"
32
33namespace connectivity::evoab {
34
35 namespace SDBCAddress {
36 typedef enum {
40 EVO_GWISE = 3
42 }
43
44 typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding
45
47 {
48 private:
51 css::uno::Reference< css::sdbcx::XTablesSupplier >
53 OString m_aPassword;
55
56 virtual ~OEvoabConnection() override;
57
58 public:
59 explicit OEvoabConnection( OEvoabDriver const & _rDriver );
61 void construct(const OUString& _rUrl,const css::uno::Sequence< css::beans::PropertyValue >& _rInfo );
62
63 void setPassword( OString const & aStr ) { m_aPassword = aStr; }
64 // own methods
65 const OEvoabDriver& getDriver() const { return m_rDriver; }
66
68 void setSDBCAddressType(SDBCAddress::sdbc_address_type _eSDBCAddressType) {m_eSDBCAddressType = _eSDBCAddressType;}
69
70 // OComponentHelper
71 virtual void SAL_CALL disposing() override;
72
73 // XServiceInfo
75
76 // XConnection
77 css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog();
78 virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement( ) override;
79 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const OUString& sql ) override;
80 virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall( const OUString& sql ) override;
81 virtual OUString SAL_CALL nativeSQL( const OUString& sql ) override;
82 virtual void SAL_CALL setAutoCommit( sal_Bool autoCommit ) override;
83 virtual sal_Bool SAL_CALL getAutoCommit( ) override;
84 virtual void SAL_CALL commit( ) override;
85 virtual void SAL_CALL rollback( ) override;
86 virtual sal_Bool SAL_CALL isClosed( ) override;
87 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) override;
88 virtual void SAL_CALL setReadOnly( sal_Bool readOnly ) override;
89 virtual sal_Bool SAL_CALL isReadOnly( ) override;
90 virtual void SAL_CALL setCatalog( const OUString& catalog ) override;
91 virtual OUString SAL_CALL getCatalog( ) override;
92 virtual void SAL_CALL setTransactionIsolation( sal_Int32 level ) override;
93 virtual sal_Int32 SAL_CALL getTransactionIsolation( ) override;
94 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap( ) override;
95 virtual void SAL_CALL setTypeMap( const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
96
97 // XCloseable
98 virtual void SAL_CALL close( ) override;
99 // XWarningsSupplier
100 virtual css::uno::Any SAL_CALL getWarnings( ) override;
101 virtual void SAL_CALL clearWarnings( ) override;
102 };
103}
104
105/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL commit() override
virtual void SAL_CALL setCatalog(const OUString &catalog) override
virtual sal_Bool SAL_CALL isReadOnly() override
virtual sal_Bool SAL_CALL isClosed() override
void construct(const OUString &_rUrl, const css::uno::Sequence< css::beans::PropertyValue > &_rInfo)
Definition: NConnection.cxx:63
virtual void SAL_CALL rollback() override
css::uno::Reference< css::sdbcx::XTablesSupplier > createCatalog()
SDBCAddress::sdbc_address_type getSDBCAddressType() const
Definition: NConnection.hxx:67
void setSDBCAddressType(SDBCAddress::sdbc_address_type _eSDBCAddressType)
Definition: NConnection.hxx:68
OEvoabConnection(OEvoabDriver const &_rDriver)
Definition: NConnection.cxx:41
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareStatement(const OUString &sql) override
virtual sal_Bool SAL_CALL getAutoCommit() override
virtual css::uno::Reference< css::sdbc::XPreparedStatement > SAL_CALL prepareCall(const OUString &sql) override
virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement() override
SDBCAddress::sdbc_address_type m_eSDBCAddressType
Definition: NConnection.hxx:50
virtual void SAL_CALL setAutoCommit(sal_Bool autoCommit) override
css::uno::Reference< css::sdbcx::XTablesSupplier > m_xCatalog
Definition: NConnection.hxx:52
virtual OUString SAL_CALL getCatalog() override
const OEvoabDriver & getDriver() const
Definition: NConnection.hxx:65
virtual void SAL_CALL setReadOnly(sal_Bool readOnly) override
virtual sal_Int32 SAL_CALL getTransactionIsolation() override
virtual OUString SAL_CALL nativeSQL(const OUString &sql) override
Definition: NConnection.cxx:94
::dbtools::WarningsContainer m_aWarnings
Definition: NConnection.hxx:54
virtual void SAL_CALL close() override
void setPassword(OString const &aStr)
Definition: NConnection.hxx:63
virtual css::uno::Any SAL_CALL getWarnings() override
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > SAL_CALL getMetaData() override
virtual void SAL_CALL clearWarnings() override
virtual void SAL_CALL setTypeMap(const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL setTransactionIsolation(sal_Int32 level) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTypeMap() override
helper class for implementing XWarningsSupplier, which mixes own warnings with warnings obtained from...
aStr
connectivity::OMetaConnection OConnection_BASE
Definition: NConnection.hxx:44
unsigned char sal_Bool