Kgapi

commentdeletejob.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 "commentdeletejob.h"
8#include "account.h"
9#include "bloggerservice.h"
10#include "comment.h"
11#include "utils.h"
12
13#include <QNetworkReply>
14#include <QNetworkRequest>
15
16using namespace KGAPI2;
17using namespace KGAPI2::Blogger;
18
19class Q_DECL_HIDDEN CommentDeleteJob::Private
20{
21public:
22 Private(const QString &blogId, const QString &postId, const QString &commentId);
23
24 const QString blogId;
25 const QString postId;
26 const QString commentId;
27};
28
29CommentDeleteJob::Private::Private(const QString &blogId_, const QString &postId_, const QString &commentId_)
30 : blogId(blogId_)
31 , postId(postId_)
32 , commentId(commentId_)
33{
34}
35
36CommentDeleteJob::CommentDeleteJob(const CommentPtr &comment, const AccountPtr &account, QObject *parent)
37 : DeleteJob(account, parent)
38 , d(new Private(comment->blogId(), comment->postId(), comment->id()))
39{
40}
41
42CommentDeleteJob::CommentDeleteJob(const QString &blogId, const QString &postId, const QString &commentId, const AccountPtr &account, QObject *parent)
43 : DeleteJob(account, parent)
44 , d(new Private(blogId, postId, commentId))
45{
46}
47
48CommentDeleteJob::~CommentDeleteJob()
49{
50 delete d;
51}
52
53void CommentDeleteJob::start()
54{
55 QNetworkRequest request(BloggerService::deleteCommentUrl(d->blogId, d->postId, d->commentId));
56
57 enqueueRequest(request);
58}
59
60void CommentDeleteJob::handleReply(const QNetworkReply *reply, const QByteArray &rawData)
61{
62 Q_UNUSED(reply)
63 Q_UNUSED(rawData)
64
66}
67
68#include "moc_commentdeletejob.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.