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 
18 namespace Akregator
19 {
20 // class PluginConfig;
21 
22  class AKREGATOR_EXPORT Plugin
23  {
24  public:
25  virtual ~Plugin();
26 
27  virtual bool init() = 0;
32  //TODO rename configureWidget( TQWidget *parent )
33  // virtual PluginConfig* configure() const { return 0; }
34 
35  void addPluginProperty( const TQString& key, const TQString& value );
36  TQString pluginProperty( const TQString& key );
37  bool hasPluginProperty( const TQString& key );
38 
39  protected:
40  Plugin();
41 
42  private:
43  TQMap<TQString, TQString> m_properties;
44  };
45 
46 } //namespace Akregator
47 
48 
49 #endif /* AKREGATOR_PLUGIN_H */
50 
51