build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / dbaccess / source / core / inc / viewcontainer.hxx
blobb8fd46b884c4792d2c19bceaa91831576a749916
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_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
21 #define INCLUDED_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
23 #include <cppuhelper/implbase1.hxx>
25 #include <com/sun/star/container/XEnumerationAccess.hpp>
26 #include <com/sun/star/container/XIndexAccess.hpp>
27 #include <com/sun/star/util/XRefreshable.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/sdbc/SQLWarning.hpp>
31 #include <com/sun/star/sdb/SQLContext.hpp>
32 #include <com/sun/star/container/XContainerListener.hpp>
33 #include "apitools.hxx"
35 #include "FilteredContainer.hxx"
37 namespace dbtools
39 class WarningsContainer;
42 namespace dbaccess
44 typedef ::cppu::ImplHelper1< css::container::XContainerListener> OViewContainer_Base;
46 // OViewContainer
47 class OViewContainer : public OFilteredContainer,
48 public OViewContainer_Base
50 public:
51 /** ctor of the container. The parent has to support the <type scope="css::sdbc">XConnection</type>
52 interface.<BR>
53 @param _rParent the object which acts as parent for the container.
54 all refcounting is rerouted to this object
55 @param _rMutex the access safety object of the parent
56 @param _rTableFilter restricts the visible tables by name
57 @param _rTableTypeFilter restricts the visible tables by type
58 @see construct
60 OViewContainer( ::cppu::OWeakObject& _rParent,
61 ::osl::Mutex& _rMutex,
62 const css::uno::Reference< css::sdbc::XConnection >& _xCon,
63 bool _bCase,
64 IRefreshListener* _pRefreshListener,
65 ::dbtools::WarningsContainer* _pWarningsContainer,
66 oslInterlockedCount& _nInAppend
69 virtual ~OViewContainer() override;
71 protected:
72 // OFilteredContainer overridables
73 virtual OUString getTableTypeRestriction() const override;
75 private:
76 virtual void SAL_CALL acquire() throw() override { OFilteredContainer::acquire();}
77 virtual void SAL_CALL release() throw() override { OFilteredContainer::release();}
78 // css::lang::XServiceInfo
79 DECLARE_SERVICE_INFO();
81 // XEventListener
82 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
83 // XContainerListener
84 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
85 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
86 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
88 // ::connectivity::sdbcx::OCollection
89 virtual ::connectivity::sdbcx::ObjectType createObject(const OUString& _rName) override;
90 virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override;
91 virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
92 virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override;
94 using OFilteredContainer::disposing;
96 bool m_bInElementRemoved;
99 #endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */