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#include "downloaditem.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN DownloadItem::Private : public QSharedData
14{
15public:
16 QUrl m_url;
17 QString m_mimeType;
18 QString m_packageName;
19 QString m_packageRepository;
20 QString m_gpgFingerprint;
21 QString m_gpgSignature;
22 Attica::DownloadDescription::Type m_type;
23
24 Private()
25 : m_type(DownloadDescription::FileDownload)
26 {
27 }
28};
29
30DownloadItem::DownloadItem()
31 : d(new Private)
32{
33}
34
35DownloadItem::DownloadItem(const Attica::DownloadItem &other)
36 : d(other.d)
37{
38}
39
40DownloadItem &DownloadItem::operator=(const Attica::DownloadItem &other)
41{
42 d = other.d;
43 return *this;
44}
45
46DownloadItem::~DownloadItem()
47{
48}
49
50void DownloadItem::setUrl(const QUrl &url)
51{
52 d->m_url = url;
53}
54
55QUrl DownloadItem::url() const
56{
57 return d->m_url;
58}
59
60void DownloadItem::setMimeType(const QString &mimeType)
61{
62 d->m_mimeType = mimeType;
63}
64
65QString DownloadItem::mimeType() const
66{
67 return d->m_mimeType;
68}
69
70void DownloadItem::setPackageName(const QString &packageName)
71{
72 d->m_packageName = packageName;
73}
74
75QString DownloadItem::packageName() const
76{
77 return d->m_packageName;
78}
79
80void DownloadItem::setPackageRepository(const QString &packageRepository)
81{
82 d->m_packageRepository = packageRepository;
83}
84
85QString DownloadItem::packageRepository() const
86{
87 return d->m_packageRepository;
88}
89
90void DownloadItem::setGpgFingerprint(const QString &gpgFingerprint)
91{
92 d->m_gpgFingerprint = gpgFingerprint;
93}
94
95QString DownloadItem::gpgFingerprint() const
96{
97 return d->m_gpgFingerprint;
98}
99
100void DownloadItem::setGpgSignature(const QString &gpgSignature)
101{
102 d->m_gpgSignature = gpgSignature;
103}
104
105QString DownloadItem::gpgSignature() const
106{
107 return d->m_gpgSignature;
108}
109
110void DownloadItem::setType(Attica::DownloadDescription::Type type)
111{
112 d->m_type = type;
113}
114
115Attica::DownloadDescription::Type DownloadItem::type()
116{
117 return d->m_type;
118}
119

source code of attica/src/downloaditem.cpp