Yearly bump
[quassel.git] / src / common / networkconfig.h
1 /***************************************************************************
2  *   Copyright (C) 2005-2013 by the Quassel Project                        *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
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.                                           *
9  *                                                                         *
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.                          *
14  *                                                                         *
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  ***************************************************************************/
20
21 #ifndef NETWORKCONFIG_H_
22 #define NETWORKCONFIG_H_
23
24 #include "syncableobject.h"
25
26 class NetworkConfig : public SyncableObject
27 {
28     SYNCABLE_OBJECT
29     Q_OBJECT
30
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)
38
39 public :
40         NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
41
42     inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
43
44 public slots:
45     inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
46     void setPingTimeoutEnabled(bool);
47     virtual inline void requestSetPingTimeoutEnabled(bool b) { REQUEST(ARG(b)) }
48
49     inline int pingInterval() const { return _pingInterval; }
50     void setPingInterval(int);
51     virtual inline void requestSetPingInterval(int i) { REQUEST(ARG(i)) }
52
53     inline int maxPingCount() const { return _maxPingCount; }
54     void setMaxPingCount(int);
55     virtual inline void requestSetMaxPingCount(int i) { REQUEST(ARG(i)) }
56
57     inline bool autoWhoEnabled() const { return _autoWhoEnabled; }
58     void setAutoWhoEnabled(bool);
59     virtual inline void requestSetAutoWhoEnabled(bool b) { REQUEST(ARG(b)) }
60
61     inline int autoWhoInterval() const { return _autoWhoInterval; }
62     void setAutoWhoInterval(int);
63     virtual inline void requestSetAutoWhoInterval(int i) { REQUEST(ARG(i)) }
64
65     inline int autoWhoNickLimit() const { return _autoWhoNickLimit; }
66     void setAutoWhoNickLimit(int);
67     virtual inline void requestSetAutoWhoNickLimit(int i) { REQUEST(ARG(i)) }
68
69     inline int autoWhoDelay() const { return _autoWhoDelay; }
70     void setAutoWhoDelay(int);
71     virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) }
72
73 signals:
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);
81
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);
89
90 private:
91     bool _pingTimeoutEnabled;
92     int _pingInterval;
93     int _maxPingCount;
94
95     bool _autoWhoEnabled;
96     int _autoWhoInterval;
97     int _autoWhoNickLimit;
98     int _autoWhoDelay;
99 };
100
101
102 #endif