akregator/src

articleinterceptor.h
1 #ifndef AKREGATOR_ARTICLEINTERCEPTOR_H
2 #define AKREGATOR_ARTICLEINTERCEPTOR_H
3 
4 #include "akregator_export.h"
5 
6 template <class T> class TQValueList;
7 
8 namespace Akregator {
9 
10 class Article;
11 
16 class AKREGATOR_EXPORT ArticleInterceptor
17 {
18  public:
20  virtual void processArticle(Article& article) = 0;
21 
22 };
23 
25 class AKREGATOR_EXPORT ArticleInterceptorManager
26 {
27  public:
28 
29  static ArticleInterceptorManager* self();
30 
32  virtual ~ArticleInterceptorManager();
33 
34  void addInterceptor(ArticleInterceptor* interceptor);
35  void removeInterceptor(ArticleInterceptor* interceptor);
36  TQValueList<ArticleInterceptor*> interceptors() const;
37 
38  private:
39  static ArticleInterceptorManager* m_self;
40  class ArticleInterceptorManagerPrivate;
41  ArticleInterceptorManagerPrivate* d;
42 };
43 
44 } //namespace Akregator
45 
46 #endif // AKREGATOR_ARTICLEINTERCEPTOR_H
Singleton managing the interceptors.
Interface for intercepting new articles which were just fetched before adding them to the archive.
virtual void processArticle(Article &article)=0
processes an article.
A proxy class for RSS::Article with some additional methods to assist sorting.
Definition: article.h:58