Attica

downloaddescription.h
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 #ifndef DOWNLOADDESCRIPTION_H
10 #define DOWNLOADDESCRIPTION_H
11 
12 #include <QSharedData>
13 #include <QString>
14 
15 #include "attica_export.h"
16 
17 namespace Attica
18 {
19 
20 class ATTICA_EXPORT DownloadDescription
21 {
22 public:
23 
24  enum Type {
25  FileDownload = 0,
26  LinkDownload,
27  PackageDownload
28  };
29 
30  DownloadDescription();
31  DownloadDescription(const DownloadDescription &other);
32 
33  DownloadDescription &operator=(const DownloadDescription &other);
34  ~DownloadDescription();
35 
40  int id() const;
41 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
42  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
43  int id();
44 #endif
45 
46 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
47  ATTICA_DEPRECATED_VERSION(0, 2, "Use DownloadDescription::type()")
48  Attica::DownloadDescription::Type type();
49 #endif
50  Attica::DownloadDescription::Type type() const;
51 #if ATTICA_ENABLE_DEPRECATED_SINCE(0, 2)
52  ATTICA_DEPRECATED_VERSION(0, 2, "Use DownloadDescription::type()")
53  bool isDownloadtypLink();
54 #endif
55 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
56  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
57  bool hasPrice();
58 #endif
59  bool hasPrice() const;
60 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
61  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
62  QString category();
63 #endif
64  QString category() const;
65 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
66  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
67  QString name();
68 #endif
69  QString name() const;
70 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
71  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
72  QString link();
73 #endif
74  QString link() const;
75 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
76  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
77  QString distributionType();
78 #endif
79  QString distributionType() const;
80 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
81  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
82  QString priceReason();
83 #endif
84  QString priceReason() const;
85 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
86  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
87  QString priceAmount();
88 #endif
89  QString priceAmount() const;
90 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
91  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
92  uint size();
93 #endif
94  uint size() const;
95 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
96  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
97  QString gpgFingerprint();
98 #endif
99  QString gpgFingerprint() const;
100 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
101  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
102  QString gpgSignature();
103 #endif
104  QString gpgSignature() const;
105 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
106  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
107  QString packageName();
108 #endif
109  QString packageName() const;
110 #if ATTICA_ENABLE_DEPRECATED_SINCE(5, 4)
111  ATTICA_DEPRECATED_VERSION(5, 4, "Use const overload")
112  QString repository();
113 #endif
114  QString repository() const;
119  QStringList tags() const;
120 
121  void setId(int id);
122  void setType(Attica::DownloadDescription::Type type);
123 #if ATTICA_ENABLE_DEPRECATED_SINCE(0, 2)
124  ATTICA_DEPRECATED_VERSION(0, 2, "Use DownloadDescription::setType(Attica::DownloadDescription::Type)")
125  void setDownloadtypLink(bool isLink);
126 #endif
127  void setHasPrice(bool hasPrice);
128  void setCategory(const QString &category);
129  void setName(const QString &name);
130  void setLink(const QString &link);
131  void setDistributionType(const QString &distributionType);
132  void setPriceReason(const QString &priceReason);
133  void setPriceAmount(const QString &priceAmount);
134  void setSize(uint size);
135  void setGpgFingerprint(const QString &fingerprint);
136  void setGpgSignature(const QString &signature);
137  void setPackageName(const QString &packageName);
138  void setRepository(const QString &repository);
143  void setTags(const QStringList &tags);
144 
145 private:
146  class Private;
148 };
149 
150 }
151 
152 #endif // DOWNLOADDESCRIPTION_H
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.