mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-30 09:04:52 +01:00
Prepare for msgs downloading.
This commit is contained in:
parent
1dbc2507df
commit
0fbe57b921
@ -21,6 +21,7 @@
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/inoreader/inoreaderserviceroot.h"
|
||||
#include "services/inoreader/network/inoreadernetworkfactory.h"
|
||||
|
||||
InoreaderFeed::InoreaderFeed(RootItem* parent) : Feed(parent) {}
|
||||
|
||||
@ -31,5 +32,7 @@ InoreaderServiceRoot* InoreaderFeed::serviceRoot() const {
|
||||
}
|
||||
|
||||
QList<Message> InoreaderFeed::obtainNewMessages(bool* error_during_obtaining) {
|
||||
return QList<Message>();
|
||||
QList<Message> messages = serviceRoot()->network()->messages(customId(), error_during_obtaining);
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
@ -101,6 +101,8 @@ RootItem* InoreaderNetworkFactory::feedsCategories(bool obtain_icons) {
|
||||
return decodeFeedCategoriesData(category_data, feed_data, obtain_icons);
|
||||
}
|
||||
|
||||
QList<Message> InoreaderNetworkFactory::messages(const QString& stream_id, bool* is_error) {}
|
||||
|
||||
RootItem* InoreaderNetworkFactory::decodeFeedCategoriesData(const QString& categories, const QString& feeds, bool obtain_icons) {
|
||||
RootItem* parent = new RootItem();
|
||||
QJsonArray json = QJsonDocument::fromJson(categories.toUtf8()).object()["tags"].toArray();
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "core/message.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
|
||||
class RootItem;
|
||||
@ -46,6 +48,8 @@ class InoreaderNetworkFactory : public QObject {
|
||||
// Returned items do not have primary IDs assigned.
|
||||
RootItem* feedsCategories(bool obtain_icons);
|
||||
|
||||
QList<Message> messages(const QString& stream_id, bool* is_error);
|
||||
|
||||
private:
|
||||
RootItem* decodeFeedCategoriesData(const QString& categories, const QString& feeds, bool obtain_icons);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user