/usr/include/AppstreamQt/component.h is in libappstreamqt-dev 0.7.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /*
* Part of Appstream, a library for accessing AppStream on-disk database
* Copyright 2014 Sune Vuorela <sune@vuorela.dk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef APPSTREAMQT_COMPONENT_H
#define APPSTREAMQT_COMPONENT_H
#include <QSharedDataPointer>
#include <QObject>
#include <QUrl>
#include <QStringList>
#include "appstreamqt_export.h"
#include "provides.h"
namespace Appstream {
class Screenshot;
class ComponentData;
/**
* Describes a Component (package) in appstream
*/
class APPSTREAMQT_EXPORT Component {
Q_GADGET
Q_ENUMS(Kind UrlKind)
public:
enum Kind {
KindUnknown,
KindGeneric,
KindDesktop,
KindFont,
KindCodec,
KindInputmethod,
KindAddon
};
enum UrlKind {
UrlKindUnknown,
UrlKindHomepage,
UrlKindBugtracker,
UrlKindFaq,
UrlKindHelp,
UrlKindDonation
};
Component();
Component(const Component& other);
~Component();
Component& operator=(const Component& other);
bool operator==(const Component& other);
Kind kind () const;
void setKind (Component::Kind kind);
QString id() const;
void setId(const QString& id);
QStringList packageNames() const;
void setPackageNames(const QStringList& packageName);
QString name() const;
void setName(const QString& name);
QString summary() const;
void setSummary(const QString& summary);
QString description() const;
void setDescription(const QString& description);
QString projectLicense() const;
void setProjectLicense(const QString& license);
QString projectGroup() const;
void setProjectGroup(const QString& group);
QString developerName() const;
void setDeveloperName(const QString& developerName);
QStringList compulsoryForDesktops() const;
void setCompulsoryForDesktops(const QStringList& desktops);
bool isCompulsoryForDesktop(const QString& desktop) const;
QStringList categories() const;
void setCategories(const QStringList& categories);
bool hasCategory(const QString& category) const;
/**
* \return generic icon name
*/
QString icon() const;
void setIcon(const QString& icon);
QUrl iconUrl() const;
void setIconUrl(const QUrl& iconUrl);
void setUrls(const QMultiHash<UrlKind , QUrl >& urls);
QMultiHash<UrlKind, QUrl> urls() const;
QList<QUrl> urls(UrlKind kind) const;
/**
* \param kind for provides
* \return a list of all provides for this \param kind
*/
QList<Appstream::Provides> provides(Provides::Kind kind) const;
void setProvides(const QList<Appstream::Provides>& provides);
/**
* \return the full list of provides for all kinds.
* Note that it might be ordered differently than the list given with
* \ref setProvides, but it will have the same entries.
*/
QList<Appstream::Provides> provides() const;
QList<Appstream::Screenshot> screenshots() const;
void setScreenshots(const QList<Appstream::Screenshot>& screenshots);
/**
* \returns whether the component is fully initialized
*/
bool isValid() const;
static Kind stringToKind(const QString& kindString);
static QString kindToString(Kind kind);
static UrlKind stringToUrlKind(const QString& urlKindString);
static QString urlKindToString(Appstream::Component::UrlKind kind);
private:
QSharedDataPointer<ComponentData> d;
};
}
#endif // APPSTREAMQT_COMPONENT_H
|