Kgapi

postdeletejob.cpp
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#include "postdeletejob.h"
8#include "bloggerservice.h"
9#include "post.h"
10
11#include <QNetworkReply>
12#include <QNetworkRequest>
13
14using namespace KGAPI2;
15using namespace KGAPI2::Blogger;
16
17class Q_DECL_HIDDEN PostDeleteJob::Private
18{
19public:
20 Private(const QString &blogId, const QString &postId);
21
22 const QString blogId;
23 const QString postId;
24};
25
26PostDeleteJob::Private::Private(const QString &blogId_, const QString &postId_)
27 : blogId(blogId_)
28 , postId(postId_)
29{
30}
31
32PostDeleteJob::PostDeleteJob(const QString &blogId, const QString &postId, const AccountPtr &account, QObject *parent)
33 : DeleteJob(account, parent)
34 , d(new Private(blogId, postId))
35{
36}
37
38PostDeleteJob::PostDeleteJob(const PostPtr &post, const AccountPtr &account, QObject *parent)
39 : DeleteJob(account, parent)
40 , d(new Private(post->blogId(), post->id()))
41{
42}
43
44PostDeleteJob::~PostDeleteJob()
45{
46 delete d;
47}
48
49void PostDeleteJob::start()
50{
51 const QUrl url = BloggerService::deletePostUrl(d->blogId, d->postId);
52 QNetworkRequest request(url);
53 enqueueRequest(request);
54}
55
56void PostDeleteJob::handleReply(const QNetworkReply *reply, const QByteArray &rawData)
57{
58 Q_UNUSED(reply)
59 Q_UNUSED(rawData)
60
62}
63
64#include "moc_postdeletejob.cpp"
Abstract superclass for all jobs that delete resources from Google.
Definition deletejob.h:25
virtual void emitFinished()
Emits Job::finished() signal.
Definition job.cpp:493
virtual void enqueueRequest(const QNetworkRequest &request, const QByteArray &data=QByteArray(), const QString &contentType=QString())
Enqueues request in dispatcher queue.
Definition job.cpp:513
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:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.