| 1 | /* |
| 2 | This file is part of KDE. |
| 3 | |
| 4 | SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@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 ATTICA_DOWNLOADITEM_H |
| 10 | #define ATTICA_DOWNLOADITEM_H |
| 11 | |
| 12 | #include <QSharedDataPointer> |
| 13 | #include <QUrl> |
| 14 | |
| 15 | #include "attica_export.h" |
| 16 | #include "downloaddescription.h" |
| 17 | |
| 18 | namespace Attica |
| 19 | { |
| 20 | |
| 21 | /*! |
| 22 | * \class Attica::DownloadItem |
| 23 | * \inheaderfile Attica/DownloadItem |
| 24 | * \inmodule Attica |
| 25 | * |
| 26 | * \brief Represents a download item. |
| 27 | */ |
| 28 | class ATTICA_EXPORT DownloadItem |
| 29 | { |
| 30 | public: |
| 31 | /*! |
| 32 | * |
| 33 | */ |
| 34 | typedef QList<DownloadItem> List; |
| 35 | class Parser; |
| 36 | |
| 37 | /*! |
| 38 | * Creates an empty DownloadItem |
| 39 | */ |
| 40 | DownloadItem(); |
| 41 | |
| 42 | DownloadItem(const DownloadItem &other); |
| 43 | |
| 44 | DownloadItem &operator=(const DownloadItem &other); |
| 45 | |
| 46 | ~DownloadItem(); |
| 47 | |
| 48 | /*! |
| 49 | * |
| 50 | */ |
| 51 | void setUrl(const QUrl &url); |
| 52 | |
| 53 | /*! |
| 54 | * |
| 55 | */ |
| 56 | QUrl url() const; |
| 57 | |
| 58 | /*! |
| 59 | * |
| 60 | */ |
| 61 | void setMimeType(const QString &mimeType); |
| 62 | |
| 63 | /*! |
| 64 | * |
| 65 | */ |
| 66 | QString mimeType() const; |
| 67 | |
| 68 | /*! |
| 69 | * |
| 70 | */ |
| 71 | void setPackageName(const QString &packageName); |
| 72 | |
| 73 | /*! |
| 74 | * |
| 75 | */ |
| 76 | QString packageName() const; |
| 77 | |
| 78 | /*! |
| 79 | * |
| 80 | */ |
| 81 | void setPackageRepository(const QString &packageRepository); |
| 82 | |
| 83 | /*! |
| 84 | * |
| 85 | */ |
| 86 | QString packageRepository() const; |
| 87 | |
| 88 | /*! |
| 89 | * |
| 90 | */ |
| 91 | void setGpgFingerprint(const QString &gpgFingerprint); |
| 92 | |
| 93 | /*! |
| 94 | * |
| 95 | */ |
| 96 | QString gpgFingerprint() const; |
| 97 | |
| 98 | /*! |
| 99 | * |
| 100 | */ |
| 101 | void setGpgSignature(const QString &gpgSignature); |
| 102 | |
| 103 | /*! |
| 104 | * |
| 105 | */ |
| 106 | QString gpgSignature() const; |
| 107 | |
| 108 | /*! |
| 109 | * |
| 110 | */ |
| 111 | void setType(Attica::DownloadDescription::Type type); |
| 112 | |
| 113 | /*! |
| 114 | * |
| 115 | */ |
| 116 | Attica::DownloadDescription::Type type(); |
| 117 | |
| 118 | private: |
| 119 | class Private; |
| 120 | QSharedDataPointer<Private> d; |
| 121 | }; |
| 122 | |
| 123 | } |
| 124 | |
| 125 | #endif // DOWNLOADITEM_H |
| 126 | |