pluginloaderbase.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef __LIBKDEPIM_PLUGINLOADERBASE_H__
00023
#define __LIBKDEPIM_PLUGINLOADERBASE_H__
00024
00025
#include <qstring.h>
00026
#include <qmap.h>
00027
00028
class KLibrary;
00029
class QStringList;
00030
00031
namespace KPIM {
00032
00033
class PluginMetaData {
00034
public:
00035 PluginMetaData() {}
00036 PluginMetaData(
const QString & lib,
const QString & name,
00037
const QString & comment )
00038 : library( lib ), nameLabel( name ),
00039 descriptionLabel( comment ), loaded( false ) {}
00040
QString library;
00041
QString nameLabel;
00042
QString descriptionLabel;
00043
mutable bool loaded;
00044 };
00045
00046
class PluginLoaderBase {
00047
protected:
00048 PluginLoaderBase();
00049
virtual ~PluginLoaderBase();
00050
00051
public:
00053
QStringList types() const;
00054
00056 const PluginMetaData * infoForName( const
QString & type ) const;
00057
00060 virtual
void scan() = 0;
00061
00062 protected:
00068
void doScan( const
char * path );
00069
00072
void * mainFunc( const
QString & type, const
char * main_func ) const;
00073
00074 private:
00075 const KLibrary * openLibrary( const
QString & libName ) const;
00076
QMap<
QString, PluginMetaData > mPluginMap;
00077
00078 class Private;
00079 Private * d;
00080 };
00081
00082 };
00083
00084 #endif
This file is part of the documentation for libkdepim Library Version 3.3.0.