/****************************************************************************
**
** Copyright (C) 2012 Róbert Márki
**
** This file is part of Web Feeds.
**
** Web Feeds is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Web Feeds is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Web Feeds.  If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/

#ifndef UPDATETREEREPLY_H
#define UPDATETREEREPLY_H
#include "newsblurreply.h"
#include "pageitem.h"
#include <QImage>
#include "everythinggroup.h"
#include "starredgroup.h"
#include "feeditem.h"
#include "folderitem.h"

namespace NewsBlur
{
class NewsBlurClient;
class UpdateTreeReply : public NewsBlurReply
{
    Q_OBJECT
public:
    UpdateTreeReply();
    WebServiceReply::Role role() const;

    PageItemPtr rootItem();
    EverythingGroupPtr everythingGroup() const;
    StarredGroupPtr starredGroup() const;
    QMultiHash<int, FeedItemPtr> feedItems() const;
    QList<FolderItemPtr> folderItems() const;
    QHash<QString, QImage> feedFavicons() const;
    int starredStoryCount() const;
    QStringList ignoredFavicons() const;

private:
    PageItemPtr m_rootItem;
    EverythingGroupPtr m_everythingGroup;
    StarredGroupPtr m_starredGroup;
    QMultiHash<int, FeedItemPtr> m_feedItems;
    QList<FolderItemPtr> m_folderItems;
    QHash<QString, QImage> m_feedFavicons;
    int m_starredStoryCount;
    QStringList m_ignoredFavicons;

    friend class NewsBlurClient;
};
typedef QSharedPointer<UpdateTreeReply> UpdateTreeReplyPtr;
} // namespace NewsBlur
#endif // UPDATETREEREPLY_H
