Kgapi

pagedeletejob.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 "pagedeletejob.h"
8#include "bloggerservice.h"
9#include "page.h"
10
11#include <QNetworkReply>
12#include <QNetworkRequest>
13
14using namespace KGAPI2;
15using namespace KGAPI2::Blogger;
16
17class Q_DECL_HIDDEN PageDeleteJob::Private
18{
19public:
20 Private(const QString &blogId, const QString &pageId);
21
22 const QString blogId;
23 const QString pageId;
24};
25
26PageDeleteJob::Private::Private(const QString &blogId_, const QString &pageId_)
27 : blogId(blogId_)
28 , pageId(pageId_)
29{
30}
31
32PageDeleteJob::PageDeleteJob(const QString &blogId, const QString &pageId, const AccountPtr &account, QObject *parent)
33 : DeleteJob(account, parent)
34 , d(new Private(blogId, pageId))
35{
36}
37
38PageDeleteJob::PageDeleteJob(const PagePtr &page, const AccountPtr &account, QObject *parent)
39 : DeleteJob(account, parent)
40 , d(new Private(page->blogId(), page->id()))
41{
42}
43
44PageDeleteJob::~PageDeleteJob()
45{
46 delete d;
47}
48
49void PageDeleteJob::start()
50{
51 QNetworkRequest request(BloggerService::deletePageUrl(d->blogId, d->pageId));
52
53 enqueueRequest(request);
54}
55
56void PageDeleteJob::handleReply(const QNetworkReply *reply, const QByteArray &rawData)
57{
58 Q_UNUSED(reply)
59 Q_UNUSED(rawData)
60
62}
63
64#include "moc_pagedeletejob.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 Mon Nov 18 2024 12:17:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.