Kgapi

deletejob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include "job.h"
12#include "kgapicore_export.h"
13
14namespace KGAPI2
15{
16
17/**
18 * @headerfile deletejob.h
19 * @brief Abstract superclass for all jobs that delete resources from Google
20 *
21 * @author Daniel Vrátil <dvratil@redhat.com>
22 * @since 2.0
23 */
24class KGAPICORE_EXPORT DeleteJob : public KGAPI2::Job
25{
26 Q_OBJECT
27
28public:
29 /**
30 * Constructor for jobs that don't require authentication
31 *
32 * @param parent
33 */
34 explicit DeleteJob(QObject *parent = nullptr);
35
36 /**
37 * @brief Constructor for jobs that require authentication
38 *
39 * @param account Account to use to authenticate the requests sent by this job
40 * @param parent
41 */
42 explicit DeleteJob(const KGAPI2::AccountPtr &account, QObject *parent = nullptr);
43
44 /**
45 * @brief Destructor
46 */
47 ~DeleteJob() override;
48
49protected:
50 /**
51 * @brief KGAPI::Job::dispatchRequest implementation
52 *
53 * @param accessManager
54 * @param request
55 * @param data
56 * @param contentType
57 */
58 void dispatchRequest(QNetworkAccessManager *accessManager, const QNetworkRequest &request, const QByteArray &data, const QString &contentType) override;
59
60 /**
61 * KGAPI2::Job::handleReply implementation
62 *
63 * This implementation will automatically call start() again in order to
64 * process another item in queue. Programmer should call emitFinished()
65 * from start() if there are no further items to delete.
66 *
67 * If you need more control over deleting or handling the reply, you can
68 * reimplement this method in your subclass.
69 *
70 * @param reply
71 * @param rawData
72 */
73 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
74
75private:
76 class Private;
77 Private *const d;
78 friend class Private;
79};
80
81} // namespace KGAPI2
Abstract superclass for all jobs that delete resources from Google.
Definition deletejob.h:25
Abstract base class for all jobs in LibKGAPI.
Definition job.h:41
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 Sat Dec 21 2024 17:00:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.