Kgapi

postpublishjob.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 "job.h"
10#include "kgapiblogger_export.h"
11
12#include <QDateTime>
13
14namespace KGAPI2
15{
16namespace Blogger
17{
18
19class KGAPIBLOGGER_EXPORT PostPublishJob : public KGAPI2::Job
20{
21 Q_OBJECT
22public:
23 enum PublishAction { Publish, Unpublish };
24
25 explicit PostPublishJob(const QString &blogId, const QString &postId, PublishAction action, const AccountPtr &account, QObject *parent = nullptr);
26 explicit PostPublishJob(const PostPtr &post, PublishAction action, const AccountPtr &account, QObject *parent = nullptr);
27 explicit PostPublishJob(const QString &blogId, const QString &postId, const QDateTime &publishDate, const AccountPtr &account, QObject *parent = nullptr);
28 explicit PostPublishJob(const PostPtr &post, const QDateTime &publishDate, const AccountPtr &account, QObject *parent = nullptr);
29 ~PostPublishJob() override;
30
31 ObjectPtr item() const;
32
33protected:
34 void start() override;
35 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
36 void dispatchRequest(QNetworkAccessManager *accessManager, const QNetworkRequest &request, const QByteArray &data, const QString &contentType) override;
37
38private:
39 class Private;
40 Private *const d;
41 friend class Private;
42};
43}
44}
Abstract base class for all jobs in LibKGAPI.
Definition job.h:41
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 Nov 29 2024 11:54:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.