begin my work on the IRC-protocol, making the editaccount dialog and the network...
[kdenetwork.git] / kopete / protocols / irc / ircnetwork.h
blobfaef8ebd90fe25b0cb57bc3bb29f5bd341629137
1 /*
2 ircnetwork.h - IRC Network List
4 Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
5 Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
6 Copyright (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
8 Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
10 *************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 *************************************************************************
20 #ifndef IRCNETWORKLIST_H
21 #define IRCNETWORKLIST_H
23 #include <QList>
24 #include <QObject>
26 namespace IRC
29 struct Host
31 QString host;
32 uint port;
33 QString password;
34 bool ssl;
37 struct Network
39 QString name;
40 QString description;
41 QList<Host> hosts;
44 typedef QList<IRC::Network> NetworkList;
46 class Networks
47 : public QObject
49 Q_OBJECT
51 private:
52 Networks();
53 ~Networks();
55 public:
56 static IRC::Networks *self();
58 const IRC::NetworkList &networks() const;
59 void setNetworks( const IRC::NetworkList& networks );
61 public slots:
62 void slotReadNetworks();
63 bool slotSaveNetworkConfig() const;
65 // void addNetwork(const IRCNetwork &network);
67 private:
68 struct Private;
69 Private * const d;
74 #endif