• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetepluginmanager.h
Go to the documentation of this file.
1 /*
2  kopetepluginmanager.h - Kopete Plugin Loader
3 
4  Copyright (c) 2002-2003 by Duncan Mac-Vicar Prett <duncan@kde.org>
5  Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
6 
7  Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2 of the License, or (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 
19 #ifndef KOPETEPLUGINMANAGER_H
20 #define KOPETEPLUGINMANAGER_H
21 
22 #include <QtCore/QObject>
23 #include <QtCore/QList>
24 #include "kopete_export.h"
25 
26 class KPluginInfo;
27 
28 namespace Kopete
29 {
30 
31 class Plugin;
32 class Protocol;
33 typedef QList<Plugin*> PluginList;
34 class PluginManagerPrivate;
35 
40 class KOPETE_EXPORT PluginManager : public QObject
41 {
42  friend class PluginManagerPrivate;
43  Q_OBJECT
44  Q_ENUMS( PluginLoadMode )
45 
46 public:
50  static PluginManager* self();
51 
62  QList<KPluginInfo> availablePlugins( const QString &category = QString() ) const;
63 
69  PluginList loadedPlugins( const QString &category = QString() ) const;
70 
81  Plugin *plugin( const QString &pluginName ) const;
82 
86  KPluginInfo pluginInfo( const Kopete::Plugin *plugin ) const;
87 
88 
99  void shutdown();
100 
116  bool setPluginEnabled( const QString &name, bool enabled = true );
117 
122  bool isAllPluginsLoaded() const;
123 
129  enum PluginLoadMode { LoadSync, LoadAsync };
130 
131 public slots:
142  Plugin *loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync );
143 
147  bool unloadPlugin( const QString &pluginName );
148 
153  void loadAllPlugins();
154 
155 signals:
159  void pluginLoaded( Kopete::Plugin *plugin );
160 
164  void pluginUnloaded( const QString &pluginName );
165 
170  void protocolLoaded( Kopete::Protocol *protocol );
171 
191  void allPluginsLoaded();
192 
193 private slots:
197  void slotPluginDestroyed( QObject *plugin );
198 
204  void slotShutdownTimeout();
205 
210  void slotShutdownDone();
211 
215  void slotPluginReadyForUnload();
216 
221  void slotLoadNextPlugin();
222 
223 private:
231  Plugin * loadPluginInternal( const QString &pluginId );
232 
240  KPluginInfo infoForPluginId( const QString &pluginId ) const;
241 
242  PluginManager();
243  ~PluginManager();
244 
245 };
246 
247 }
248 
249 #endif // KOPETEPLUGINMANAGER_H
250 
251 // vim: set noet ts=4 sts=4 sw=4:
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::Protocol
base class of every protocol.
Definition: kopeteprotocol.h:62
QObject
Kopete::PluginList
QList< Plugin * > PluginList
Definition: kopetepluginmanager.h:32
kopete_export.h
QString
QList
Kopete::Plugin
Base class for all plugins or protocols.
Definition: kopeteplugin.h:84
Kopete::PluginManager
Definition: kopetepluginmanager.h:40
Kopete::PluginManager::PluginLoadMode
PluginLoadMode
Plugin loading mode.
Definition: kopetepluginmanager.h:129
name
const char * name
Definition: kopeteonlinestatus.cpp:104
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal