akonadi
pluginloader_p.h
00001 /* -*- c++ -*- 00002 Copyright (c) 2008 Tobias Koenig <tokoe@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef AKONADI_PLUGINLOADER_P_H 00021 #define AKONADI_PLUGINLOADER_P_H 00022 00023 #include "akonadiprivate_export.h" 00024 00025 #include <QtCore/QHash> 00026 #include <QtCore/QString> 00027 00028 class QPluginLoader; 00029 00030 namespace Akonadi { 00031 00032 class AKONADI_TESTS_EXPORT PluginMetaData 00033 { 00034 public: 00035 PluginMetaData(); 00036 PluginMetaData( const QString & lib, const QString & name, const QString & comment, const QString & cname ); 00037 00038 QString library; 00039 QString nameLabel; 00040 QString descriptionLabel; 00041 QString className; 00042 bool loaded; 00043 }; 00044 00045 class AKONADI_TESTS_EXPORT PluginLoader 00046 { 00047 public: 00048 ~PluginLoader(); 00049 00050 static PluginLoader* self(); 00051 00052 QStringList names() const; 00053 00054 QObject* createForName( const QString & name ); 00055 00056 PluginMetaData infoForName( const QString & name ) const; 00057 00058 void scan(); 00059 00060 private: 00061 PluginLoader(); 00062 00063 static PluginLoader *mSelf; 00064 QHash<QString, QPluginLoader*> mPluginLoaders; 00065 QHash<QString, PluginMetaData> mPluginInfos; 00066 }; 00067 00068 } 00069 00070 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:35 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:35 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.