KVIrc 5.2.6
Developer APIs
KviIrcServerDataBase.h
Go to the documentation of this file.
1#ifndef _KVI_IRCSERVERDB_H_
2#define _KVI_IRCSERVERDB_H_
3//=============================================================================
4//
5// File : KviIrcServerDataBase.h
6// Creation date : Mon Jul 10 2000 14:15:42 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10//
11// This program is FREE software. You can redistribute it and/or
12// modify it under the terms of the GNU General Public License
13// as published by the Free Software Foundation; either version 2
14// of the License, or (at your option) any later version.
15//
16// This program is distributed in the HOPE that it will be USEFUL,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24//
25//=============================================================================
26
33#include "kvi_settings.h"
34#include "kvi_inttypes.h"
35#include "KviPointerHashTable.h"
36
37#include <QString>
38
39class KviIrcNetwork;
40class KviIrcServer;
41
48{
49 QString szServer;
50 kvi_u32_t uPort;
52 bool bIPv6;
53 bool bSSL;
55 QString szLinkFilter;
56 QString szPass;
57 QString szNick;
58 QString szInitUMode;
59 QString szId;
60};
61
67{
68public:
74
79
80private:
85
86public:
91 void clear();
92
98
109 KviPointerList<KviIrcServer> * autoConnectOnStartupServers() const { return m_pAutoConnectOnStartupServers; }
110
121 KviPointerList<KviIrcNetwork> * autoConnectOnStartupNetworks() const { return m_pAutoConnectOnStartupNetworks; }
122
127 void clearAutoConnectOnStartupServers();
128
133 void clearAutoConnectOnStartupNetworks();
134
140 void setCurrentNetwork(const QString & szNetName) { m_szCurrentNetwork = szNetName; }
141
146 const QString & currentNetworkName() const { return m_szCurrentNetwork; }
147
152 KviIrcNetwork * currentNetwork();
153
159 void addNetwork(KviIrcNetwork * pNet);
160
166 KviIrcNetwork * findNetwork(const QString & szName);
167
172 unsigned int networkCount() const;
173
179 void load(const QString & szFilename);
180
186 void save(const QString & szFilename);
187
195 void importFromMircIni(const QString & filename, const QString & szMircIni, QStringList & recentServers);
196
203 bool makeCurrentServer(KviIrcServerDefinition * pDef, QString & szError);
204
212 bool makeCurrentBestServerInNetwork(const QString & szNetName, KviIrcNetwork * pNet, QString & szError);
213};
214
215#endif //_KVI_IRCSERVERDB_H_
Pointer Hash Table.
btnDict clear()
Network handling class.
Definition KviIrcNetwork.h:48
Irc server database handling class.
Definition KviIrcServerDataBase.h:67
KviPointerList< KviIrcServer > * autoConnectOnStartupServers() const
Returns a list of servers to connect on startup This list is computed when the data are loaded from d...
Definition KviIrcServerDataBase.h:109
KviPointerHashTable< QString, KviIrcNetwork > * recordDict() const
Returns the record dictionary of the database.
Definition KviIrcServerDataBase.h:97
void setCurrentNetwork(const QString &szNetName)
Sets the current network.
Definition KviIrcServerDataBase.h:140
KviPointerList< KviIrcServer > * m_pAutoConnectOnStartupServers
Definition KviIrcServerDataBase.h:83
KviPointerList< KviIrcNetwork > * autoConnectOnStartupNetworks() const
Returns a list of networks to connect on startup This list is computed when the data are loaded from ...
Definition KviIrcServerDataBase.h:121
QString m_szCurrentNetwork
Definition KviIrcServerDataBase.h:82
const QString & currentNetworkName() const
Returns the current network name.
Definition KviIrcServerDataBase.h:146
KviPointerList< KviIrcNetwork > * m_pAutoConnectOnStartupNetworks
Definition KviIrcServerDataBase.h:84
KviPointerHashTable< QString, KviIrcNetwork > * m_pRecords
Definition KviIrcServerDataBase.h:81
The class which manages the irc servers.
Definition KviIrcServer.h:52
A fast pointer hash table implementation.
Definition KviPointerHashTable.h:450
A template double linked list of pointers.
Definition KviPointerList.h:371
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
QString szMircIni
Definition libkvisetup.cpp:51
Definition KviIrcServerDataBase.h:48
bool bSTARTTLS
Definition KviIrcServerDataBase.h:54
QString szNick
Definition KviIrcServerDataBase.h:57
kvi_u32_t uPort
Definition KviIrcServerDataBase.h:50
QString szPass
Definition KviIrcServerDataBase.h:56
bool bIPv6
Definition KviIrcServerDataBase.h:52
bool bSSL
Definition KviIrcServerDataBase.h:53
QString szServer
Definition KviIrcServerDataBase.h:49
QString szInitUMode
Definition KviIrcServerDataBase.h:58
QString szLinkFilter
Definition KviIrcServerDataBase.h:55
bool bPortIsValid
Definition KviIrcServerDataBase.h:51
QString szId
Definition KviIrcServerDataBase.h:59