6#ifndef SWIFT_MISC_DB_ARTIFACT_H
7#define SWIFT_MISC_DB_ARTIFACT_H
19namespace swift::misc::db
28 IndexName = CPropertyIndexRef::GlobalIndexCArtifact,
35 IndexSizeHumanReadable,
53 bool existing,
const CPlatform &platform);
56 bool hasName()
const {
return !m_name.isEmpty(); }
80 QString getFileSizeHumanReadable()
const;
92 bool matchesAnyPlatform(
const CPlatform &platform)
const;
110 bool hasUnrestrictedDistribution()
const;
113 bool isWithDistribution(
const CDistribution &distribution,
bool acceptMoreStableDistributions)
const;
120 bool isNewerThanCurrentBuild()
const;
123 QString convertToQString(
bool i18n =
false)
const;
126 QString convertToQString(
const QString &separator,
bool i18n =
false)
const;
138 static const QString &typeToString(ArtifactType type);
146 int m_type =
static_cast<int>(UnknownArtifact);
148 bool m_existing =
false;
150 CDistributionList m_distributions;
153 static QString versionNumberFromFilename(
const QString &filename);
156 static ArtifactType stringToType(
const QString &str);
Non-owning reference to a CPropertyIndex with a subset of its features.
Artifacts ("our software" products).
ColumnIndex
Properties by index.
bool hasDistributions() const
Has distributions?
void setType(ArtifactType type)
Set type.
void setName(const QString &name)
Set the name.
const CPlatform & getPlatform() const
OS.
const QString & getName() const
Name (i.e. installer name, symbol name).
bool isUnknown() const
Unknown.
int getFileSize() const
File size.
void setPlatform(const CPlatform &platform)
Set the OS.
CArtifact()=default
Default constructor.
void setFileSize(int size)
Set file size.
void setDistributions(const CDistributionList &distributions)
Related distributions.
const CDistributionList & getDistributions() const
Related distributions.
const QString & getMd5() const
MD5.
bool hasName() const
Having name?
CDistribution getMostStableDistribution() const
Most stable distribution if any.
ArtifactType getType() const
Get type.
Distributions for channel.
Multiple distributions for different channels:
IDatastoreObjectWithIntegerKey()
Constructor.
Plugin loaded by X-Plane which publishes a DBus service.
QString trimmed() const const
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...