Kgapi

commentfetchjob.h
1/*
2 * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#pragma once
8
9#include "fetchjob.h"
10#include "kgapiblogger_export.h"
11
12#include <QDateTime>
13
14namespace KGAPI2
15{
16namespace Blogger
17{
18
19class KGAPIBLOGGER_EXPORT CommentFetchJob : public KGAPI2::FetchJob
20{
21 Q_OBJECT
22
23 Q_PROPERTY(QDateTime endDate READ endDate WRITE setEndDate)
24
25 Q_PROPERTY(QDateTime startDate READ startDate WRITE setStartDate)
26
27 Q_PROPERTY(bool fetchBodies READ fetchBodies WRITE setFetchBodies)
28
29 Q_PROPERTY(uint maxResults READ maxResults WRITE setMaxResults)
30
31public:
32 explicit CommentFetchJob(const QString &blogId, const QString &postId, const AccountPtr &account = AccountPtr(), QObject *parent = nullptr);
33 explicit CommentFetchJob(const QString &blogId,
34 const QString &postId,
35 const QString &commentId,
36 const AccountPtr &account = AccountPtr(),
37 QObject *parent = nullptr);
38 explicit CommentFetchJob(const QString &blogId, const AccountPtr &account = AccountPtr(), QObject *parent = nullptr);
39 ~CommentFetchJob() override;
40
41 QDateTime endDate() const;
42 void setEndDate(const QDateTime &endDate);
43
44 QDateTime startDate() const;
45 void setStartDate(const QDateTime &startDate);
46
47 bool fetchBodies() const;
48 void setFetchBodies(bool fetchBodies);
49
50 uint maxResults() const;
51 void setMaxResults(uint maxResults);
52
53protected:
54 void start() override;
55 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
56
57private:
58 class Private;
59 Private *const d;
60 friend class Private;
61};
62
63} // namespace Blogger
64} // namespace KGAPI2
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.h:25
Q_SCRIPTABLE Q_NOREPLY void start()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:57:06 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.