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 namespace Akregator
00018 {
00019 //    class PluginConfig;
00020 
00021     class AKREGATOR_EXPORT Plugin
00022     {
00023         public:
00024             virtual ~Plugin();
00025 
00026             virtual bool init() = 0;
00031              //TODO rename configureWidget( TQWidget *parent )
00032             // virtual PluginConfig* configure() const { return 0; }
00033 
00034             void addPluginProperty( const TQString& key, const TQString& value );
00035             TQString pluginProperty( const TQString& key );
00036             bool hasPluginProperty( const TQString& key );
00037 
00038         protected:
00039             Plugin();
00040 
00041         private:
00042             TQMap<TQString, TQString> m_properties;
00043     };
00044 
00045 } //namespace Akregator
00046 
00047 
00048 #endif /* AKREGATOR_PLUGIN_H */
00049 
00050