1// SPDX-License-Identifier: LGPL-2.1-or-later
2// SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org>
3// SPDX-FileCopyrightText: 2003-2007 Josef Spillner <spillner@kde.org>
4// SPDX-FileCopyrightText: 2009 Jeremy Whiting <jpwhiting@kde.org>
5// SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org>
6// SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
7
8#pragma once
9
10#include "entry.h"
11
12namespace KNSCore
13{
14
15class DownloadLinkInformationV2Private
16{
17public:
18 QString name;
19 QString priceAmount;
20 QString distributionType;
21 QString descriptionLink;
22 int id = -1;
23 bool isDownloadtypeLink = false;
24 quint64 size = 0;
25 QStringList tags;
26 QString version;
27};
28
29class EntryPrivate : public QSharedData
30{
31public:
32 EntryPrivate()
33 {
34 qRegisterMetaType<KNSCore::Entry::List>();
35 }
36
37 bool operator==(const EntryPrivate &other) const
38 {
39 return mUniqueId == other.mUniqueId && mProviderId == other.mProviderId;
40 }
41
42 QString mUniqueId;
43 QString mRequestedUniqueId; // We need to map the entry to the request in the ResultsStream, but invalid entries would have an empty ID
44 QString mName;
45 QUrl mHomepage;
46 QString mCategory;
47 QString mLicense;
48 QString mVersion;
49 QDate mReleaseDate = QDate::currentDate();
50
51 // Version and date if a newer version is found (updateable)
52 QString mUpdateVersion;
53 QDate mUpdateReleaseDate;
54
55 Author mAuthor;
56 int mRating = 0;
57 int mNumberOfComments = 0;
58 int mDownloadCount = 0;
59 int mNumberFans = 0;
60 int mNumberKnowledgebaseEntries = 0;
61 QString mKnowledgebaseLink;
62 QString mSummary;
63 QString mShortSummary;
64 QString mChangelog;
65 QString mPayload;
66 QStringList mInstalledFiles;
67 QString mProviderId;
68 QStringList mUnInstalledFiles;
69 QString mDonationLink;
70 QStringList mTags;
71
72 QString mChecksum;
73 QString mSignature;
74 KNSCore::Entry::Status mStatus = Entry::Invalid;
75 Entry::Source mSource = Entry::Online;
76 Entry::EntryType mEntryType = Entry::CatalogEntry;
77
78 QString mPreviewUrl[6];
79 QImage mPreviewImage[6];
80
81 QList<DownloadLinkInformationV2Private> mDownloadLinkInformationList;
82};
83
84} // namespace KNSCore
85

source code of knewstuff/src/core/entry_p.h