File indexing completed on 2024-05-12 05:22:10

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include "fetchjob.h"
0010 #include "kgapiblogger_export.h"
0011 
0012 namespace KGAPI2
0013 {
0014 
0015 namespace Blogger
0016 {
0017 
0018 class KGAPIBLOGGER_EXPORT BlogFetchJob : public KGAPI2::FetchJob
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     enum FetchBy { FetchByBlogId, FetchByBlogUrl, FetchByUserId };
0024     explicit BlogFetchJob(const QString &id, FetchBy fetchBy, const AccountPtr &account = AccountPtr(), QObject *parent = nullptr);
0025     ~BlogFetchJob() override;
0026 
0027 protected:
0028     void start() override;
0029     ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
0030 
0031 private:
0032     class Private;
0033     Private *const d;
0034     friend class Private;
0035 };
0036 
0037 } // namespace Blogger
0038 } // namespace KGAPI2