akregator/src

plugin.h
1 // Author: Mark Kretschmann (C) Copyright 2004
2 // Copyright: See COPYING file that comes with this distribution
3 
4 #ifndef AKREGATOR_PLUGIN_H
5 #define AKREGATOR_PLUGIN_H
6 
7 #include "akregator_export.h"
8 
9 #define AKREGATOR_EXPORT_PLUGIN( classname ) \
10  extern "C" { \
11  Akregator::Plugin* create_plugin() { return new classname; } \
12  }
13 
14 #include <tqmap.h>
15 #include <tqstring.h>
16 
17 namespace Akregator
18 {
19 // class PluginConfig;
20 
21  class AKREGATOR_EXPORT Plugin
22  {
23  public:
24  virtual ~Plugin();
25 
26  virtual bool init() = 0;
31  //TODO rename configureWidget( TQWidget *parent )
32  // virtual PluginConfig* configure() const { return 0; }
33 
34  void addPluginProperty( const TQString& key, const TQString& value );
35  TQString pluginProperty( const TQString& key );
36  bool hasPluginProperty( const TQString& key );
37 
38  protected:
39  Plugin();
40 
41  private:
42  TQMap<TQString, TQString> m_properties;
43  };
44 
45 } //namespace Akregator
46 
47 
48 #endif /* AKREGATOR_PLUGIN_H */
49 
50