KVIrc 5.2.0
Developer APIs
KviModuleManager.h
Go to the documentation of this file.
1#ifndef _KVI_MODULEMANAGER_H_
2#define _KVI_MODULEMANAGER_H_
3//=============================================================================
4//
5// File : KviModuleManager.h
6// Creation date : Sat Aug 12 2000 20:31:17 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
27#include "kvi_settings.h"
28#include "KviModule.h"
29#include "KviPointerHashTable.h"
30
31#include <QTimer>
32#include <QObject>
33#include <vector>
34
35class KVIRC_API KviModuleManager : public QObject
36{
37 Q_OBJECT
38public:
41
42private:
46
47public:
48 QString & lastError() { return m_szLastError; };
49 KviModule * findModule(const QString & modName);
50 KviModule * getModule(const QString & modName);
51 bool loadModule(const QString & modName);
52 bool unloadModule(const QString & modName);
53 bool unloadModule(KviModule * module);
54 void unloadAllModules();
55 //void registerDefaultCommands(KviModule * module);
56 void loadModulesByCaps(const QString & caps, const QString & dir);
57 void loadModulesByCaps(const QString & caps);
58 bool hasLockedModules();
59 void completeModuleNames(const QString & word, std::vector<QString> & matches);
60
61protected:
62 void completeModuleNames(const QString & path, const QString & work, std::vector<QString> & matches);
63public slots:
64 void cleanupUnusedModules();
65signals:
67};
68
70
71#endif //_KVI_MODULEMANAGER_H_
KVIRC_API KviModuleManager * g_pModuleManager
Definition KviModuleManager.cpp:40
Pointer Hash Table.
Definition KviModuleManager.h:36
QString m_szLastError
Definition KviModuleManager.h:45
void moduleAboutToUnload(KviModule *m)
QString & lastError()
Definition KviModuleManager.h:48
QTimer * m_pCleanupTimer
Definition KviModuleManager.h:44
KviPointerHashTable< QString, KviModule > * m_pModuleDict
Definition KviModuleManager.h:43
Definition KviModule.h:131
A fast pointer hash table implementation.
Definition KviPointerHashTable.h:450
#define m
Definition detector.cpp:78
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127