Line data Source code
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 : #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HCATALOG_HXX
20 : #define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HCATALOG_HXX
21 :
22 : #include <connectivity/sdbcx/VCatalog.hxx>
23 : #include <connectivity/StdTypeDefs.hxx>
24 :
25 : namespace connectivity
26 : {
27 : namespace hsqldb
28 : {
29 : // please don't name the class the same name as in an other namespaces
30 : // some compilers have problems with this task as I noticed on windows
31 18 : class OHCatalog : public connectivity::sdbcx::OCatalog
32 : {
33 : ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
34 :
35 : /** calls XDatabaseMetaData::getTables.
36 : @param _sKindOfObject
37 : The type of tables to be fetched.
38 : @param _rNames
39 : The container for the names to be filled.
40 : */
41 : void refreshObjects(const ::com::sun::star::uno::Sequence< OUString >& _sKindOfObject,TStringVector& _rNames);
42 :
43 : public:
44 : // implementation of the pure virtual methods
45 : virtual void refreshTables() SAL_OVERRIDE;
46 : virtual void refreshViews() SAL_OVERRIDE ;
47 : virtual void refreshGroups() SAL_OVERRIDE;
48 : virtual void refreshUsers() SAL_OVERRIDE ;
49 :
50 : public:
51 : OHCatalog(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection);
52 :
53 0 : inline sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
54 0 : inline sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
55 9 : inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; }
56 :
57 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 : // ::cppu::OComponentHelper
59 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 : };
61 : }
62 : }
63 : #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HCATALOG_HXX
64 :
65 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|