Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _OFFAPP_CONNPOOLSETTINGS_HXX_
30 : : #define _OFFAPP_CONNPOOLSETTINGS_HXX_
31 : :
32 : : #include <tools/string.hxx>
33 : : #include <comphelper/stl_types.hxx>
34 : : #include <svl/poolitem.hxx>
35 : :
36 : : //........................................................................
37 : : namespace offapp
38 : : {
39 : : //........................................................................
40 : :
41 : : //====================================================================
42 : : //= DriverPooling
43 : : //====================================================================
44 : 0 : struct DriverPooling
45 : : {
46 : : String sName;
47 : : sal_Bool bEnabled;
48 : : sal_Int32 nTimeoutSeconds;
49 : :
50 : : DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout );
51 : :
52 : : sal_Bool operator == (const DriverPooling& _rR) const;
53 : 0 : sal_Bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); }
54 : : };
55 : :
56 : : //====================================================================
57 : : //= DriverPoolingSettings
58 : : //====================================================================
59 : 0 : class DriverPoolingSettings
60 : : {
61 : : protected:
62 : : DECLARE_STL_VECTOR( DriverPooling, DriverSettings );
63 : : DriverSettings m_aDrivers;
64 : :
65 : : public:
66 : : typedef ConstDriverSettingsIterator const_iterator;
67 : : typedef DriverSettingsIterator iterator;
68 : :
69 : : public:
70 : : DriverPoolingSettings();
71 : :
72 : 0 : sal_Int32 size() const { return m_aDrivers.size(); }
73 : :
74 : 0 : const_iterator begin() const { return m_aDrivers.begin(); }
75 : 0 : const_iterator end() const { return m_aDrivers.end(); }
76 : :
77 : 0 : iterator begin() { return m_aDrivers.begin(); }
78 : 0 : iterator end() { return m_aDrivers.end(); }
79 : :
80 : 0 : void push_back(const DriverPooling& _rElement) { m_aDrivers.push_back(_rElement); }
81 : : };
82 : :
83 : : //====================================================================
84 : : //= DriverPoolingSettingsItem
85 : : //====================================================================
86 [ # # ]: 0 : class DriverPoolingSettingsItem : public SfxPoolItem
87 : : {
88 : : protected:
89 : : DriverPoolingSettings m_aSettings;
90 : :
91 : : public:
92 : : TYPEINFO();
93 : :
94 : : DriverPoolingSettingsItem( sal_uInt16 _nId, const DriverPoolingSettings &_rSettings );
95 : :
96 : : virtual int operator==( const SfxPoolItem& ) const;
97 : : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
98 : :
99 : 0 : const DriverPoolingSettings& getSettings() const { return m_aSettings; }
100 : : };
101 : :
102 : : //........................................................................
103 : : } // namespace offapp
104 : : //........................................................................
105 : :
106 : : #endif // _OFFAPP_CONNPOOLSETTINGS_HXX_
107 : :
108 : :
109 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|