KVIrc 5.2.0
Developer APIs
KviIrcUserDataBase.h
Go to the documentation of this file.
1#ifndef _KVI_IRCUSERDB_H_
2#define _KVI_IRCUSERDB_H_
3//=============================================================================
4//
5// File : KviIrcUserDataBase.h
6// Creation date : Mon Jul 31 2000 20:59:12 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 "KviIrcUserEntry.h"
35#include "KviPointerHashTable.h"
36
37#include <QObject>
38#include <QString>
39
41
46class KVILIB_API KviIrcUserDataBase : public QObject
47{
48 Q_OBJECT
49public:
55
60
61private:
63
64public:
69 void clear();
70
78 KviIrcUserEntry * insertUser(const QString & szNick, const QString & szUser, const QString & szHost);
79
85 KviIrcUserEntry * find(const QString & szNick) { return m_pDict->find(szNick); };
86
93 bool removeUser(const QString & szNick, KviIrcUserEntry * pEntry);
94
100
106 KviRegisteredUser * registeredUser(const QString & szNick);
107
115 KviRegisteredUser * registeredUser(const QString & szNick, const QString & szUser, const QString & szHost);
116
122 bool haveCustomColor(const QString & szNick);
123
129 QColor * customColor(const QString & szNick);
130
135 void setupConnectionWithReguserDb();
136protected slots:
142 void registeredUserChanged(const QString & szUser);
143
149 void registeredUserAdded(const QString & szUser);
150
155 void registeredDatabaseCleared();
156};
157
158#endif //_KVI_IRCUSERDB_H_
User DB handling.
Pointer Hash Table.
btnDict clear()
The class which manages the user database.
Definition KviIrcUserDataBase.h:47
KviIrcUserEntry * find(const QString &szNick)
Searches for a user in the database.
Definition KviIrcUserDataBase.h:85
KviPointerHashTable< QString, KviIrcUserEntry > * dict()
Returns the database dictionary.
Definition KviIrcUserDataBase.h:99
KviPointerHashTable< QString, KviIrcUserEntry > * m_pDict
Definition KviIrcUserDataBase.h:62
A class to handle the entries of the user database.
Definition KviIrcUserEntry.h:45
A fast pointer hash table implementation.
Definition KviPointerHashTable.h:450
T * find(const Key &hKey)
Returns the item associated to the key.
Definition KviPointerHashTable.h:471
Definition KviRegisteredUser.h:40
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
QString szHost
Definition libkvisetup.cpp:48