masterfix DEV300: #i10000# build fix
[LibreOffice.git] / cui / source / options / connpoolsettings.hxx
blob4a835d15a728057622ed806836471a2700465bcf
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _OFFAPP_CONNPOOLSETTINGS_HXX_
29 #define _OFFAPP_CONNPOOLSETTINGS_HXX_
31 #include <tools/string.hxx>
32 #include <comphelper/stl_types.hxx>
33 #include <svl/poolitem.hxx>
35 //........................................................................
36 namespace offapp
38 //........................................................................
40 //====================================================================
41 //= DriverPooling
42 //====================================================================
43 struct DriverPooling
45 String sName;
46 sal_Bool bEnabled;
47 sal_Int32 nTimeoutSeconds;
49 DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout );
51 sal_Bool operator == (const DriverPooling& _rR) const;
52 sal_Bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); }
55 //====================================================================
56 //= DriverPoolingSettings
57 //====================================================================
58 class DriverPoolingSettings
60 protected:
61 DECLARE_STL_VECTOR( DriverPooling, DriverSettings );
62 DriverSettings m_aDrivers;
64 public:
65 typedef ConstDriverSettingsIterator const_iterator;
66 typedef DriverSettingsIterator iterator;
68 public:
69 DriverPoolingSettings();
71 sal_Int32 size() const { return m_aDrivers.size(); }
73 const_iterator begin() const { return m_aDrivers.begin(); }
74 const_iterator end() const { return m_aDrivers.end(); }
76 iterator begin() { return m_aDrivers.begin(); }
77 iterator end() { return m_aDrivers.end(); }
79 void push_back(const DriverPooling& _rElement) { m_aDrivers.push_back(_rElement); }
82 //====================================================================
83 //= DriverPoolingSettingsItem
84 //====================================================================
85 class DriverPoolingSettingsItem : public SfxPoolItem
87 protected:
88 DriverPoolingSettings m_aSettings;
90 public:
91 TYPEINFO();
93 DriverPoolingSettingsItem( sal_uInt16 _nId, const DriverPoolingSettings _rSettings );
95 virtual int operator==( const SfxPoolItem& ) const;
96 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
98 const DriverPoolingSettings& getSettings() const { return m_aSettings; }
101 //........................................................................
102 } // namespace offapp
103 //........................................................................
105 #endif // _OFFAPP_CONNPOOLSETTINGS_HXX_