1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: connpoolsettings.hxx,v $
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 //........................................................................
41 //........................................................................
43 //====================================================================
45 //====================================================================
50 sal_Int32 nTimeoutSeconds
;
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
65 DECLARE_STL_VECTOR( DriverPooling
, DriverSettings
);
66 DriverSettings m_aDrivers
;
69 typedef ConstDriverSettingsIterator const_iterator
;
70 typedef DriverSettingsIterator iterator
;
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
92 DriverPoolingSettings m_aSettings
;
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_