akregator/src

kernel.h
1/*
2 This file is part of Akregator.
3
4 Copyright (C) 2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of TQt, and distribute the resulting executable,
22 without including the source code for TQt in the source distribution.
23*/
24
25#ifndef AKREGATOR_KERNEL_H
26#define AKREGATOR_KERNEL_H
27
28#include "articlefilter.h"
29
30namespace Akregator {
31
32namespace Backend
33{
34 class Storage;
35}
36
37class FeedList;
38class FetchQueue;
39class TagSet;
40
41class Kernel
42{
43 public:
44
45 static Kernel* self();
46
47 Kernel();
48 virtual ~Kernel();
49
50 Backend::Storage* storage() { return m_storage; }
51 void setStorage(Backend::Storage* storage) { m_storage = storage; }
52
53 FeedList* feedList() { return m_feedList; }
54 void setFeedList(FeedList* feedList) { m_feedList = feedList; }
55
56 FetchQueue* fetchQueue() { return m_fetchQueue; }
57
58 TagSet* tagSet() { return m_tagSet; }
59
60 void setArticleFilterList(const Filters::ArticleFilterList& list)
61 {
62 m_articleFilterList = list;
63 }
64
65 Filters::ArticleFilterList articleFilterList() const { return m_articleFilterList; }
66
67 private:
68
69 static Kernel* m_self;
70
71 Backend::Storage* m_storage;
72 FeedList* m_feedList;
73 FetchQueue* m_fetchQueue;
74 TagSet* m_tagSet;
75 Filters::ArticleFilterList m_articleFilterList;
76};
77
78}
79
80#endif // AKREGATOR_KERNEL_H