1 /***************************************************************************
2 * Copyright (C) 2005-09 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef NETWORKCONFIG_H_
22 #define NETWORKCONFIG_H_
24 #include "syncableobject.h"
26 class NetworkConfig : public SyncableObject {
30 Q_PROPERTY(bool pingTimeoutEnabled READ pingTimeoutEnabled WRITE setPingTimeoutEnabled)
31 Q_PROPERTY(int pingInterval READ pingInterval WRITE setPingInterval)
32 Q_PROPERTY(int maxPingCount READ maxPingCount WRITE setMaxPingCount)
33 Q_PROPERTY(bool autoWhoEnabled READ autoWhoEnabled WRITE setAutoWhoEnabled)
34 Q_PROPERTY(int autoWhoInterval READ autoWhoInterval WRITE setAutoWhoInterval)
35 Q_PROPERTY(int autoWhoNickLimit READ autoWhoNickLimit WRITE setAutoWhoNickLimit)
36 Q_PROPERTY(int autoWhoDelay READ autoWhoDelay WRITE setAutoWhoDelay)
39 NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
41 inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
44 inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
45 void setPingTimeoutEnabled(bool);
46 virtual inline void requestSetPingTimeoutEnabled(bool b) { REQUEST(ARG(b)) }
48 inline int pingInterval() const { return _pingInterval; }
49 void setPingInterval(int);
50 virtual inline void requestSetPingInterval(int i) { REQUEST(ARG(i)) }
52 inline int maxPingCount() const { return _maxPingCount; }
53 void setMaxPingCount(int);
54 virtual inline void requestSetMaxPingCount(int i) { REQUEST(ARG(i)) }
56 inline bool autoWhoEnabled() const { return _autoWhoEnabled; }
57 void setAutoWhoEnabled(bool);
58 virtual inline void requestSetAutoWhoEnabled(bool b) { REQUEST(ARG(b)) }
60 inline int autoWhoInterval() const { return _autoWhoInterval; }
61 void setAutoWhoInterval(int);
62 virtual inline void requestSetAutoWhoInterval(int i) { REQUEST(ARG(i)) }
64 inline int autoWhoNickLimit() const { return _autoWhoNickLimit; }
65 void setAutoWhoNickLimit(int);
66 virtual inline void requestSetAutoWhoNickLimit(int i) { REQUEST(ARG(i)) }
68 inline int autoWhoDelay() const { return _autoWhoDelay; }
69 void setAutoWhoDelay(int);
70 virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) }
73 void pingTimeoutEnabledSet(bool);
74 void pingIntervalSet(int);
75 // void maxPingCountSet(int);
76 void autoWhoEnabledSet(bool);
77 void autoWhoIntervalSet(int);
78 // void autoWhoNickLimitSet(int);
79 void autoWhoDelaySet(int);
81 // void setPingTimeoutEnabledRequested(bool);
82 // void setPingIntervalRequested(int);
83 // void setMaxPingCountRequested(int);
84 // void setAutoWhoEnabledRequested(bool);
85 // void setAutoWhoIntervalRequested(int);
86 // void setAutoWhoNickLimitRequested(int);
87 // void setAutoWhoDelayRequested(int);
90 bool _pingTimeoutEnabled;
96 int _autoWhoNickLimit;