File indexing completed on 2025-03-09 04:52:25
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "fetchjob.h" 0012 #include "kgapicore_export.h" 0013 0014 namespace KGAPI2 0015 { 0016 0017 /** 0018 * @brief A job to fetch AccountInfo 0019 * 0020 * AccountInfo provides basic information about user authenticated by given 0021 * Account. 0022 * 0023 * @author Daniel Vrátil <dvratil@redhat.com> 0024 * @since: 2.0 0025 */ 0026 class KGAPICORE_EXPORT AccountInfoFetchJob : public KGAPI2::FetchJob 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 /** 0032 * @brief Constructs a new AccountInfoFetchJob 0033 * 0034 * @param account Account for which to retrieve the info 0035 * @param parent 0036 */ 0037 explicit AccountInfoFetchJob(const AccountPtr &account, QObject *parent = nullptr); 0038 0039 /** 0040 * @brief Destructor 0041 */ 0042 ~AccountInfoFetchJob() override; 0043 0044 protected: 0045 /** 0046 * @brief KGAPI2::Job::start implementation 0047 */ 0048 void start() override; 0049 0050 /** 0051 * @brief KGAPI2::FetchJob::handleReplyWithItems implementation 0052 * 0053 * @param reply 0054 * @param rawData 0055 */ 0056 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override; 0057 0058 private: 0059 class Private; 0060 Private *const d; 0061 friend class Private; 0062 }; 0063 0064 } // namespace KGAPI2