1 /***************************************************************************
2 * Copyright (C) 2005-2013 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 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #ifndef NETWORKCONFIG_H_
22 #define NETWORKCONFIG_H_
24 #include "syncableobject.h"
26 class NetworkConfig : public SyncableObject
31 Q_PROPERTY(bool pingTimeoutEnabled READ pingTimeoutEnabled WRITE setPingTimeoutEnabled)
32 Q_PROPERTY(int pingInterval READ pingInterval WRITE setPingInterval)
33 Q_PROPERTY(int maxPingCount READ maxPingCount WRITE setMaxPingCount)
34 Q_PROPERTY(bool autoWhoEnabled READ autoWhoEnabled WRITE setAutoWhoEnabled)
35 Q_PROPERTY(int autoWhoInterval READ autoWhoInterval WRITE setAutoWhoInterval)
36 Q_PROPERTY(int autoWhoNickLimit READ autoWhoNickLimit WRITE setAutoWhoNickLimit)
37 Q_PROPERTY(int autoWhoDelay READ autoWhoDelay WRITE setAutoWhoDelay)
40 NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
42 inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
45 inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
46 void setPingTimeoutEnabled(bool);
47 virtual inline void requestSetPingTimeoutEnabled(bool b) { REQUEST(ARG(b)) }
49 inline int pingInterval() const { return _pingInterval; }
50 void setPingInterval(int);
51 virtual inline void requestSetPingInterval(int i) { REQUEST(ARG(i)) }
53 inline int maxPingCount() const { return _maxPingCount; }
54 void setMaxPingCount(int);
55 virtual inline void requestSetMaxPingCount(int i) { REQUEST(ARG(i)) }
57 inline bool autoWhoEnabled() const { return _autoWhoEnabled; }
58 void setAutoWhoEnabled(bool);
59 virtual inline void requestSetAutoWhoEnabled(bool b) { REQUEST(ARG(b)) }
61 inline int autoWhoInterval() const { return _autoWhoInterval; }
62 void setAutoWhoInterval(int);
63 virtual inline void requestSetAutoWhoInterval(int i) { REQUEST(ARG(i)) }
65 inline int autoWhoNickLimit() const { return _autoWhoNickLimit; }
66 void setAutoWhoNickLimit(int);
67 virtual inline void requestSetAutoWhoNickLimit(int i) { REQUEST(ARG(i)) }
69 inline int autoWhoDelay() const { return _autoWhoDelay; }
70 void setAutoWhoDelay(int);
71 virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) }
74 void pingTimeoutEnabledSet(bool);
75 void pingIntervalSet(int);
76 // void maxPingCountSet(int);
77 void autoWhoEnabledSet(bool);
78 void autoWhoIntervalSet(int);
79 // void autoWhoNickLimitSet(int);
80 void autoWhoDelaySet(int);
82 // void setPingTimeoutEnabledRequested(bool);
83 // void setPingIntervalRequested(int);
84 // void setMaxPingCountRequested(int);
85 // void setAutoWhoEnabledRequested(bool);
86 // void setAutoWhoIntervalRequested(int);
87 // void setAutoWhoNickLimitRequested(int);
88 // void setAutoWhoDelayRequested(int);
91 bool _pingTimeoutEnabled;
97 int _autoWhoNickLimit;