| 1 | /* |
| 2 | This file is part of KDE. |
| 3 | |
| 4 | SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org> |
| 5 | |
| 6 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #ifndef LISTJOB_H |
| 10 | #define LISTJOB_H |
| 11 | |
| 12 | #include "attica_export.h" |
| 13 | #include "getjob.h" |
| 14 | |
| 15 | class QNetworkRequest; |
| 16 | |
| 17 | namespace Attica |
| 18 | { |
| 19 | class Provider; |
| 20 | |
| 21 | /*! |
| 22 | * \class Attica::ListJob |
| 23 | * \inheaderfile Attica/ListJob |
| 24 | * \inmodule Attica |
| 25 | * |
| 26 | * \brief Represents a list job. |
| 27 | */ |
| 28 | template<class T> |
| 29 | class ATTICA_EXPORT ListJob : public GetJob |
| 30 | { |
| 31 | public: |
| 32 | /*! |
| 33 | * |
| 34 | */ |
| 35 | typename T::List itemList() const; |
| 36 | |
| 37 | protected: |
| 38 | void parse(const QString &xml) override; |
| 39 | |
| 40 | private: |
| 41 | ListJob(PlatformDependent *internals, const QNetworkRequest &request); |
| 42 | typename T::List m_itemList; |
| 43 | friend class Attica::Provider; |
| 44 | }; |
| 45 | |
| 46 | } |
| 47 | |
| 48 | #endif |
| 49 | |