ircnetworkentity.h
1 //------------------------------------------------------------------------------
2 // ircnetworkentity.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
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 Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2010 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #ifndef __IRCNETWORKENTITY_H__
24 #define __IRCNETWORKENTITY_H__
25 
26 #include "dptr.h"
27 #include "global.h"
28 #include <QString>
29 #include <QStringList>
30 
31 class PatternList;
32 
38 class MAIN_EXPORT IRCNetworkEntity
39 {
40  public:
41  static IRCNetworkEntity deserializeQVariant(const QVariant &var);
42 
44  virtual ~IRCNetworkEntity();
45 
49  const QString &address() const;
50 
55  const QStringList &autojoinChannels() const;
56  QStringList &autojoinChannels();
60  const QStringList &autojoinCommands() const;
61  QStringList &autojoinCommands();
62 
73  const QString &description() const;
74 
75  const PatternList &ignoredUsers() const;
76  void setIgnoredUsers(const PatternList &val);
77 
81  bool isAutojoinNetwork() const;
82 
83  bool isValid() const;
84 
85  const QString &nickservCommand() const;
86  const QString &nickservPassword() const;
87 
91  bool operator<(const IRCNetworkEntity& other) const;
92 
96  bool operator==(const IRCNetworkEntity& other) const;
97 
101  const QString &password() const;
102 
108  unsigned short port() const;
109 
110  QVariant serializeQVariant() const;
111 
112  void setAddress(const QString &v);
113  void setAutojoinChannels(const QStringList &v);
114  void setAutojoinCommands(const QStringList &v);
115  void setAutojoinNetwork(bool v);
116  void setDescription(const QString &v);
117  void setNickservCommand(const QString &v);
118  void setNickservPassword(const QString &v);
119  void setPassword(const QString &v);
120  void setPort(unsigned short v);
121 
122  private:
124 };
125 
126 #endif
Data structure that describes and defines a connection to an IRC network or server.