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
18namespace Attica
19{
20
21/**
22 * @class DownloadItem downloaditem.h <Attica/DownloadItem>
23 *
24 * Represents a download item.
25 */
26class ATTICA_EXPORT DownloadItem
27{
28public:
29 typedef QList<DownloadItem> List;
30 class Parser;
31
32 /**
33 * Creates an empty DownloadItem
34 */
35 DownloadItem();
36
37 /**
38 * Copy constructor.
39 * @param other the DownloadItem to copy from
40 */
41 DownloadItem(const DownloadItem &other);
42
43 /**
44 * Assignment operator.
45 * @param other the DownloadItem to assign from
46 * @return pointer to this DownloadItem
47 */
48 DownloadItem &operator=(const DownloadItem &other);
49
50 /**
51 * Destructor.
52 */
53 ~DownloadItem();
54
55 void setUrl(const QUrl &url);
56 QUrl url() const;
57 void setMimeType(const QString &mimeType);
58 QString mimeType() const;
59 void setPackageName(const QString &packageName);
60 QString packageName() const;
61 void setPackageRepository(const QString &packageRepository);
62 QString packageRepository() const;
63 void setGpgFingerprint(const QString &gpgFingerprint);
64 QString gpgFingerprint() const;
65 void setGpgSignature(const QString &gpgSignature);
66 QString gpgSignature() const;
67 void setType(Attica::DownloadDescription::Type type);
68 Attica::DownloadDescription::Type type();
69
70private:
71 class Private;
72 QSharedDataPointer<Private> d;
73};
74
75}
76
77#endif // DOWNLOADITEM_H
78

source code of attica/src/downloaditem.h