Kgapi

personfetchjob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2022 Claudio Cambra <claudio.cambra@kde.org>
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 "fetchjob.h"
12#include "kgapipeople_export.h"
13
14namespace KGAPI2::People
15{
16
17class KGAPIPEOPLE_EXPORT PersonFetchJob : public KGAPI2::FetchJob
18{
19 Q_OBJECT
20 Q_PROPERTY(QString syncToken READ syncToken WRITE setSyncToken NOTIFY syncTokenChanged)
21 Q_PROPERTY(QString receivedSyncToken READ receivedSyncToken NOTIFY receivedSyncTokenChanged)
22
23public:
24 explicit PersonFetchJob(const AccountPtr &account, QObject* parent = nullptr);
25 explicit PersonFetchJob(const QString &resourceName, const AccountPtr &account, QObject* parent = nullptr);
26 ~PersonFetchJob();
27
28 [[nodiscard]] QString syncToken() const;
29 [[nodiscard]] QString receivedSyncToken() const;
30
31public Q_SLOTS:
32 void setSyncToken(const QString &syncToken);
33
34Q_SIGNALS:
35 void syncTokenChanged();
36 void receivedSyncTokenChanged();
37
38protected:
39 void start() override;
40 ObjectsList handleReplyWithItems(const QNetworkReply *reply,
41 const QByteArray &rawData) override;
42 bool handleError(int statusCode, const QByteArray &rawData) override;
43
44private:
45 class Private;
46 std::unique_ptr<Private> d;
47 friend class Private;
48};
49
50}
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.h:25
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.