Attica

downloaditem.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Frederik Gladhorn <[email protected]>
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 
11 using namespace Attica;
12 
13 class DownloadItem::Private : public QSharedData
14 {
15 public:
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 
30 DownloadItem::DownloadItem()
31  : d(new Private)
32 {
33 }
34 
35 DownloadItem::DownloadItem(const Attica::DownloadItem &other)
36  : d(other.d)
37 {
38 }
39 
40 DownloadItem &DownloadItem::operator=(const Attica::DownloadItem &other)
41 {
42  d = other.d;
43  return *this;
44 }
45 
46 DownloadItem::~DownloadItem()
47 {}
48 
49 void DownloadItem::setUrl(const QUrl &url)
50 {
51  d->m_url = url;
52 }
53 
54 QUrl DownloadItem::url() const
55 {
56  return d->m_url;
57 }
58 
59 void DownloadItem::setMimeType(const QString &mimeType)
60 {
61  d->m_mimeType = mimeType;
62 }
63 
64 QString DownloadItem::mimeType() const
65 {
66  return d->m_mimeType;
67 }
68 
69 void DownloadItem::setPackageName(const QString &packageName)
70 {
71  d->m_packageName = packageName;
72 }
73 
74 QString DownloadItem::packageName() const
75 {
76  return d->m_packageName;
77 }
78 
79 void DownloadItem::setPackageRepository(const QString &packageRepository)
80 {
81  d->m_packageRepository = packageRepository;
82 }
83 
84 QString DownloadItem::packageRepository() const
85 {
86  return d->m_packageRepository;
87 }
88 
89 void DownloadItem::setGpgFingerprint(const QString &gpgFingerprint)
90 {
91  d->m_gpgFingerprint = gpgFingerprint;
92 }
93 
94 QString DownloadItem::gpgFingerprint() const
95 {
96  return d->m_gpgFingerprint;
97 }
98 
99 void DownloadItem::setGpgSignature(const QString &gpgSignature)
100 {
101  d->m_gpgSignature = gpgSignature;
102 }
103 
104 QString DownloadItem::gpgSignature() const
105 {
106  return d->m_gpgSignature;
107 }
108 
109 void DownloadItem::setType(Attica::DownloadDescription::Type type)
110 {
111  d->m_type = type;
112 }
113 
114 Attica::DownloadDescription::Type DownloadItem::type()
115 {
116  return d->m_type;
117 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 03:59:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.