File indexing completed on 2024-05-12 05:22:25

0001 /*
0002  * This file is part of LibKGAPI library
0003  *
0004  * SPDX-FileCopyrightText: 2022 Claudio Cambra <claudio.cambra@kde.org>
0005  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006  *
0007  */
0008 
0009 #pragma once
0010 
0011 #include "fetchjob.h"
0012 #include "kgapipeople_export.h"
0013 
0014 namespace KGAPI2::People
0015 {
0016 
0017 class KGAPIPEOPLE_EXPORT ContactGroupFetchJob : public KGAPI2::FetchJob
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     explicit ContactGroupFetchJob(const AccountPtr &account, QObject *parent = nullptr);
0023     ContactGroupFetchJob(const QString &resourceName,
0024                          const AccountPtr &account,
0025                          QObject* parent = nullptr); // Use the resourceName as an id for the contact group
0026     ~ContactGroupFetchJob();
0027 
0028 protected:
0029     void start() override;
0030     ObjectsList handleReplyWithItems(const QNetworkReply *reply,
0031                                      const QByteArray &rawData) override;
0032 
0033 private:
0034     class Private;
0035     std::unique_ptr<Private> d;
0036     friend class Private;
0037 };
0038 
0039 }