// SPDX-License-Identifier: LGPL-2.1-or-later // SPDX-FileCopyrightText: 2009-2010 Frederik Gladhorn // SPDX-FileCopyrightText: 2024 Harald Sitter #pragma once #include #include #include #include "entry.h" #include "searchrequest.h" namespace KNSCore { class AtticaProvider; class AtticaRequester : public QObject { Q_OBJECT public: explicit AtticaRequester(const KNSCore::SearchRequest &request, AtticaProvider *provider, QObject *parent = nullptr); void start(); [[nodiscard]] KNSCore::SearchRequest request() const; Q_SIGNALS: void entriesLoaded(const KNSCore::Entry::List &list); void loadingDone(); void loadingFailed(); void entryDetailsLoaded(const KNSCore::Entry &entry); private Q_SLOTS: void detailsLoaded(Attica::BaseJob *job); void categoryContentsLoaded(Attica::BaseJob *job); private: void startInternal(); void checkForUpdates(); [[nodiscard]] Entry::List installedEntries() const; [[nodiscard]] Entry entryFromAtticaContent(const Attica::Content &content); KNSCore::SearchRequest m_request; AtticaProvider *m_provider; QSet m_updateJobs; }; } // namespace KNSCore