4 * Copyright (c) 2007 Frerich Raabe <raabe@kde.org>
6 * This program is distributed in the hope that it will be useful, but WITHOUT
7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8 * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
9 * accompanying file 'COPYING'.
11 #ifndef NEWSFEEDMANAGER_H
12 #define NEWSFEEDMANAGER_H
17 #include <QStringList>
19 #include <syndication/loader.h>
21 class NewsFeedManager
: public QObject
25 static NewsFeedManager
*self();
27 void setSubscriptions( const QStringList
&urls
);
29 const QMap
<QUrl
, Syndication::FeedPtr
> &availableFeeds() const;
33 void updateFeed( const QUrl
&url
);
36 void feedLoaded( const QUrl
&url
);
37 void updateFinished();
40 void loaderFinished( Syndication::Loader
*loader
, Syndication::FeedPtr feed
,
41 Syndication::ErrorCode status
);
45 NewsFeedManager( const NewsFeedManager
&other
); // disabled
46 void operator=( const NewsFeedManager
&rhs
); // disabled
48 static NewsFeedManager
*s_instance
;
50 QStringList m_subscriptions
;
51 QMap
<Syndication::Loader
*, QUrl
> m_activeLoaders
;
52 QMap
<QUrl
, Syndication::FeedPtr
> m_availableFeeds
;
55 #endif // NEWSFEEDMANAGER_H