e8a15d396a
- Created kf6-attica recipe (minimal core library build providing KF6::Attica cmake target, needed by kf6-knewstuff). v6.10.0, QML/tests/examples disabled. - Added kf6-attica to redbear-full.toml config, integrate-redbear.sh symlink, and recipes/kde/ symlink. - Fixed kf6-knewstuff: removed stale find_package(KF6Attica) suppression; added kf6-attica as dependency. Now publishes to repo (core-only build produces empty package — upstream code structure yields no libs with QtQuick/widgets/tools off). - Cookbook topo-sort: changed cycle fallback from silent Ok(recipes) to Err(Recursion) — surfaces dependency graph bugs instead of hiding them. - Fixed stale QtNetwork comment: QtNetwork IS enabled in qtbase since 2026-04-29 (relibc DNS resolver hardened). - Verified: kf6-attica builds, kf6-knewstuff publishes to repo
104 lines
2.6 KiB
C++
104 lines
2.6 KiB
C++
/*
|
|
This file is part of KDE.
|
|
|
|
SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org>
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
*/
|
|
|
|
#ifndef DOWNLOADDESCRIPTION_H
|
|
#define DOWNLOADDESCRIPTION_H
|
|
|
|
#include <QSharedData>
|
|
#include <QString>
|
|
|
|
#include "attica_export.h"
|
|
|
|
namespace Attica
|
|
{
|
|
|
|
/**
|
|
* @class DownloadDescription downloaddescription.h <Attica/DownloadDescription>
|
|
*
|
|
* Represents a download description.
|
|
*/
|
|
class ATTICA_EXPORT DownloadDescription
|
|
{
|
|
public:
|
|
enum Type {
|
|
FileDownload = 0,
|
|
LinkDownload,
|
|
PackageDownload,
|
|
};
|
|
|
|
DownloadDescription();
|
|
DownloadDescription(const DownloadDescription &other);
|
|
|
|
DownloadDescription &operator=(const DownloadDescription &other);
|
|
~DownloadDescription();
|
|
|
|
/**
|
|
The id of the description - as one Content can have multiple download descriptions associated.
|
|
This will simply be 1, 2, ...
|
|
*/
|
|
int id() const;
|
|
|
|
Attica::DownloadDescription::Type type() const;
|
|
bool hasPrice() const;
|
|
QString category() const;
|
|
QString name() const;
|
|
QString link() const;
|
|
QString distributionType() const;
|
|
QString priceReason() const;
|
|
QString priceAmount() const;
|
|
uint size() const;
|
|
QString gpgFingerprint() const;
|
|
QString gpgSignature() const;
|
|
QString packageName() const;
|
|
QString repository() const;
|
|
/**
|
|
* Get the list of tags for this download description
|
|
* @since 5.50
|
|
*/
|
|
QStringList tags() const;
|
|
|
|
void setId(int id);
|
|
void setType(Attica::DownloadDescription::Type type);
|
|
void setHasPrice(bool hasPrice);
|
|
void setCategory(const QString &category);
|
|
void setName(const QString &name);
|
|
void setLink(const QString &link);
|
|
void setDistributionType(const QString &distributionType);
|
|
void setPriceReason(const QString &priceReason);
|
|
void setPriceAmount(const QString &priceAmount);
|
|
void setSize(uint size);
|
|
void setGpgFingerprint(const QString &fingerprint);
|
|
void setGpgSignature(const QString &signature);
|
|
void setPackageName(const QString &packageName);
|
|
void setRepository(const QString &repository);
|
|
/**
|
|
* Set the list of tags for this download description
|
|
* @since 5.50
|
|
*/
|
|
void setTags(const QStringList &tags);
|
|
|
|
/**
|
|
* The download version as set on the remote. May be QString() when not set.
|
|
* @since 6.5
|
|
*/
|
|
[[nodiscard]] QString version() const;
|
|
|
|
/**
|
|
* @since 6.5
|
|
*/
|
|
void setVersion(const QString &version);
|
|
|
|
private:
|
|
class Private;
|
|
QSharedDataPointer<Private> d;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // DOWNLOADDESCRIPTION_H
|