1 /***************************************************************************
2 * Copyright (C) 2005-2018 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 ***************************************************************************/
23 #include "syncableobject.h"
25 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)
37 Q_PROPERTY(bool standardCtcp READ standardCtcp WRITE setStandardCtcp)
40 NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
43 inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
44 void setPingTimeoutEnabled(bool);
45 virtual inline void requestSetPingTimeoutEnabled(bool b) { REQUEST(ARG(b)) }
47 inline int pingInterval() const { return _pingInterval; }
48 void setPingInterval(int);
49 virtual inline void requestSetPingInterval(int i) { REQUEST(ARG(i)) }
51 inline int maxPingCount() const { return _maxPingCount; }
52 void setMaxPingCount(int);
53 virtual inline void requestSetMaxPingCount(int i) { REQUEST(ARG(i)) }
55 inline bool autoWhoEnabled() const { return _autoWhoEnabled; }
56 void setAutoWhoEnabled(bool);
57 virtual inline void requestSetAutoWhoEnabled(bool b) { REQUEST(ARG(b)) }
59 inline int autoWhoInterval() const { return _autoWhoInterval; }
60 void setAutoWhoInterval(int);
61 virtual inline void requestSetAutoWhoInterval(int i) { REQUEST(ARG(i)) }
63 inline int autoWhoNickLimit() const { return _autoWhoNickLimit; }
64 void setAutoWhoNickLimit(int);
65 virtual inline void requestSetAutoWhoNickLimit(int i) { REQUEST(ARG(i)) }
67 inline int autoWhoDelay() const { return _autoWhoDelay; }
68 void setAutoWhoDelay(int);
69 virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) }
71 inline bool standardCtcp() const { return _standardCtcp; }
72 void setStandardCtcp(bool);
73 virtual inline void requestSetStandardCtcp(bool b) { REQUEST(ARG(b)) }
76 void pingTimeoutEnabledSet(bool);
77 void pingIntervalSet(int);
78 // void maxPingCountSet(int);
79 void autoWhoEnabledSet(bool);
80 void autoWhoIntervalSet(int);
81 // void autoWhoNickLimitSet(int);
82 void autoWhoDelaySet(int);
83 void standardCtcpSet(bool);
85 // void setPingTimeoutEnabledRequested(bool);
86 // void setPingIntervalRequested(int);
87 // void setMaxPingCountRequested(int);
88 // void setAutoWhoEnabledRequested(bool);
89 // void setAutoWhoIntervalRequested(int);
90 // void setAutoWhoNickLimitRequested(int);
91 // void setAutoWhoDelayRequested(int);
94 bool _pingTimeoutEnabled;
100 int _autoWhoNickLimit;