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

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • viewer
pluginloaderbase.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  This file is part of libkdepim.
3 
4  Copyright (c) 2002,2004 Marc Mutz <mutz@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef PLUGINLOADERBASE_H
23 #define PLUGINLOADERBASE_H
24 
25 #include <QString>
26 #include <QMap>
27 #include <KLibrary>
28 
29 class QStringList;
30 
31 class PluginMetaData
32 {
33  public:
34  PluginMetaData() : loaded(false) {}
35  PluginMetaData( const QString & lib, const QString & name,
36  const QString & comment )
37  : library( lib ), nameLabel( name ),
38  descriptionLabel( comment ), loaded( false ) {}
39  QString library;
40  QString nameLabel;
41  QString descriptionLabel;
42  bool loaded;
43 };
44 
45 class PluginLoaderBase
46 {
47  protected:
48  PluginLoaderBase();
49  virtual ~PluginLoaderBase();
50 
51  public:
53  QStringList types() const;
54 
56  const PluginMetaData * infoForName( const QString & type ) const;
57 
60  virtual void scan() = 0;
61 
62  protected:
68  void doScan( const char * path );
69 
72  KLibrary::void_function_ptr mainFunc( const QString & type, const char * main_func ) const;
73 
74  private:
75  const KLibrary * openLibrary( const QString & libName ) const;
76  mutable QMap< QString, PluginMetaData > mPluginMap;
77 
78  class Private;
79  Private * d;
80 };
81 
82 #endif // PLUGINLOADERBASE_H
PluginMetaData::library
QString library
Definition: pluginloaderbase.h:39
PluginMetaData
Definition: pluginloaderbase.h:31
PluginMetaData::PluginMetaData
PluginMetaData()
Definition: pluginloaderbase.h:34
PluginMetaData::descriptionLabel
QString descriptionLabel
Definition: pluginloaderbase.h:41
PluginMetaData::PluginMetaData
PluginMetaData(const QString &lib, const QString &name, const QString &comment)
Definition: pluginloaderbase.h:35
PluginMetaData::loaded
bool loaded
Definition: pluginloaderbase.h:42
PluginLoaderBase::doScan
void doScan(const char *path)
Rescans the plugin directory to find any newly installed plugins.
Definition: pluginloaderbase.cpp:52
PluginLoaderBase::types
QStringList types() const
Returns a list of all available plugin objects (of kind T)
Definition: pluginloaderbase.cpp:39
PluginLoaderBase::PluginLoaderBase
PluginLoaderBase()
Definition: pluginloaderbase.cpp:36
type
const char * type
Definition: bodypartformatter.cpp:192
PluginLoaderBase::~PluginLoaderBase
virtual ~PluginLoaderBase()
Definition: pluginloaderbase.cpp:37
PluginLoaderBase::scan
virtual void scan()=0
Overload this method in subclasses to call doScan with the right path argument.
PluginLoaderBase
Definition: pluginloaderbase.h:45
PluginLoaderBase::infoForName
const PluginMetaData * infoForName(const QString &type) const
Returns the PluginMetaData structure for a given type.
Definition: pluginloaderbase.cpp:47
PluginMetaData::nameLabel
QString nameLabel
Definition: pluginloaderbase.h:40
PluginLoaderBase::mainFunc
KLibrary::void_function_ptr mainFunc(const QString &type, const char *main_func) const
Returns a pointer to symbol main_func in the library that implements the plugin of type type...
Definition: pluginloaderbase.cpp:97
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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