ircnetworkentity.h
1 //------------------------------------------------------------------------------
2 // ircnetworkentity.h
3 //------------------------------------------------------------------------------
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library 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 GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; 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 class QVariant;
33 
39 class MAIN_EXPORT IRCNetworkEntity
40 {
41  public:
42  static IRCNetworkEntity deserializeQVariant(const QVariant &var);
43 
45  virtual ~IRCNetworkEntity();
46 
50  const QString &address() const;
51 
56  const QStringList &autojoinChannels() const;
57  QStringList &autojoinChannels();
61  const QStringList &autojoinCommands() const;
62  QStringList &autojoinCommands();
63 
74  const QString &description() const;
75 
76  const PatternList &ignoredUsers() const;
77  void setIgnoredUsers(const PatternList &val);
78 
82  bool isAutojoinNetwork() const;
83 
84  bool isValid() const;
85 
86  const QString &nickservCommand() const;
87  const QString &nickservPassword() const;
88 
92  bool operator<(const IRCNetworkEntity& other) const;
93 
97  bool operator==(const IRCNetworkEntity& other) const;
98 
102  const QString &password() const;
103 
109  unsigned short port() const;
110 
111  QVariant serializeQVariant() const;
112 
113  void setAddress(const QString &v);
114  void setAutojoinChannels(const QStringList &v);
115  void setAutojoinCommands(const QStringList &v);
116  void setAutojoinNetwork(bool v);
117  void setDescription(const QString &v);
118  void setNickservCommand(const QString &v);
119  void setNickservPassword(const QString &v);
120  void setPassword(const QString &v);
121  void setPort(unsigned short v);
122 
123  private:
125 };
126 
127 #endif
Data structure that describes and defines a connection to an IRC network or server.