akregator/src

plugin.h

00001 // Author: Mark Kretschmann (C) Copyright 2004
00002 // Copyright: See COPYING file that comes with this distribution
00003 
00004 #ifndef AKREGATOR_PLUGIN_H
00005 #define AKREGATOR_PLUGIN_H
00006 
00007 #include "akregator_export.h"
00008 
00009 #define AKREGATOR_EXPORT_PLUGIN( classname ) \
00010     extern "C" { \
00011          Akregator::Plugin* create_plugin() { return new classname; } \
00012     }
00013 
00014 #include <tqmap.h>
00015 #include <tqstring.h>
00016 
00017 
00018 namespace Akregator
00019 {
00020 //    class PluginConfig;
00021 
00022     class AKREGATOR_EXPORT Plugin
00023     {
00024         public:
00025             virtual ~Plugin();
00026 
00027             virtual bool init() = 0;
00032              //TODO rename configureWidget( TQWidget *parent )
00033             // virtual PluginConfig* configure() const { return 0; }
00034 
00035             void addPluginProperty( const TQString& key, const TQString& value );
00036             TQString pluginProperty( const TQString& key );
00037             bool hasPluginProperty( const TQString& key );
00038 
00039         protected:
00040             Plugin();
00041 
00042         private:
00043             TQMap<TQString, TQString> m_properties;
00044     };
00045 
00046 } //namespace Akregator
00047 
00048 
00049 #endif /* AKREGATOR_PLUGIN_H */
00050 
00051