Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / options / connpoolsettings.hxx
blob4bd0d32a256e8ce108dccff7740b82590b5d6b3a
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 _OFFAPP_CONNPOOLSETTINGS_HXX_
21 #define _OFFAPP_CONNPOOLSETTINGS_HXX_
23 #include <tools/string.hxx>
24 #include <comphelper/stl_types.hxx>
25 #include <svl/poolitem.hxx>
27 //........................................................................
28 namespace offapp
30 //........................................................................
32 //====================================================================
33 //= DriverPooling
34 //====================================================================
35 struct DriverPooling
37 String sName;
38 sal_Bool bEnabled;
39 sal_Int32 nTimeoutSeconds;
41 DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout );
43 sal_Bool operator == (const DriverPooling& _rR) const;
44 sal_Bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); }
47 //====================================================================
48 //= DriverPoolingSettings
49 //====================================================================
50 class DriverPoolingSettings
52 protected:
53 DECLARE_STL_VECTOR( DriverPooling, DriverSettings );
54 DriverSettings m_aDrivers;
56 public:
57 typedef ConstDriverSettingsIterator const_iterator;
58 typedef DriverSettingsIterator iterator;
60 public:
61 DriverPoolingSettings();
63 sal_Int32 size() const { return m_aDrivers.size(); }
65 const_iterator begin() const { return m_aDrivers.begin(); }
66 const_iterator end() const { return m_aDrivers.end(); }
68 iterator begin() { return m_aDrivers.begin(); }
69 iterator end() { return m_aDrivers.end(); }
71 void push_back(const DriverPooling& _rElement) { m_aDrivers.push_back(_rElement); }
74 //====================================================================
75 //= DriverPoolingSettingsItem
76 //====================================================================
77 class DriverPoolingSettingsItem : public SfxPoolItem
79 protected:
80 DriverPoolingSettings m_aSettings;
82 public:
83 TYPEINFO();
85 DriverPoolingSettingsItem( sal_uInt16 _nId, const DriverPoolingSettings &_rSettings );
87 virtual int operator==( const SfxPoolItem& ) const;
88 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
90 const DriverPoolingSettings& getSettings() const { return m_aSettings; }
93 //........................................................................
94 } // namespace offapp
95 //........................................................................
97 #endif // _OFFAPP_CONNPOOLSETTINGS_HXX_
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */