merge the formfield patch from ooo-build
[ooovba.git] / svx / source / cui / connpoolsettings.hxx
blob7788ea7e80fe5cebfe5c6661e474231ea4de5209
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: connpoolsettings.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _OFFAPP_CONNPOOLSETTINGS_HXX_
32 #define _OFFAPP_CONNPOOLSETTINGS_HXX_
34 #include <tools/string.hxx>
35 #include <comphelper/stl_types.hxx>
36 #include <svtools/poolitem.hxx>
38 //........................................................................
39 namespace offapp
41 //........................................................................
43 //====================================================================
44 //= DriverPooling
45 //====================================================================
46 struct DriverPooling
48 String sName;
49 sal_Bool bEnabled;
50 sal_Int32 nTimeoutSeconds;
52 DriverPooling();
53 DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout );
55 sal_Bool operator == (const DriverPooling& _rR) const;
56 sal_Bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); }
59 //====================================================================
60 //= DriverPoolingSettings
61 //====================================================================
62 class DriverPoolingSettings
64 protected:
65 DECLARE_STL_VECTOR( DriverPooling, DriverSettings );
66 DriverSettings m_aDrivers;
68 public:
69 typedef ConstDriverSettingsIterator const_iterator;
70 typedef DriverSettingsIterator iterator;
72 public:
73 DriverPoolingSettings();
75 sal_Int32 size() const { return m_aDrivers.size(); }
77 const_iterator begin() const { return m_aDrivers.begin(); }
78 const_iterator end() const { return m_aDrivers.end(); }
80 iterator begin() { return m_aDrivers.begin(); }
81 iterator end() { return m_aDrivers.end(); }
83 void push_back(const DriverPooling& _rElement) { m_aDrivers.push_back(_rElement); }
86 //====================================================================
87 //= DriverPoolingSettingsItem
88 //====================================================================
89 class DriverPoolingSettingsItem : public SfxPoolItem
91 protected:
92 DriverPoolingSettings m_aSettings;
94 public:
95 TYPEINFO();
97 DriverPoolingSettingsItem( sal_uInt16 _nId, const DriverPoolingSettings _rSettings );
99 virtual int operator==( const SfxPoolItem& ) const;
100 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
102 const DriverPoolingSettings& getSettings() const { return m_aSettings; }
105 //........................................................................
106 } // namespace offapp
107 //........................................................................
109 #endif // _OFFAPP_CONNPOOLSETTINGS_HXX_