nymea/libnymea/platform/package.h

69 lines
2.8 KiB
C++

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2019 Michael Zanetti <michael.zanetti@nymea.io> *
* *
* This file is part of nymea. *
* *
* 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, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef PACKAGE_H
#define PACKAGE_H
#include <QString>
class Package
{
public:
explicit Package(const QString &packageId = QString(), const QString &displayName = QString(), const QString &installedVersion = QString(), const QString &candidateVersion = QString(), const QString &changelog = QString());
QString packageId() const;
QString displayName() const;
QString installedVersion() const;
void setInstalledVersion(const QString &installedVersion);
QString candidateVersion() const;
void setCandidateVersion(const QString &candidateVersion);
QString changelog() const;
void setChangelog(const QString &changelog);
bool updateAvailable() const;
void setUpdateAvailable(bool updateAvailable);
bool rollbackAvailable() const;
void setRollbackAvailable(bool rollbackAvailable);
bool canRemove() const;
void setCanRemove(bool canRemove);
bool operator==(const Package &other) const;
bool operator!=(const Package &other) const;
private:
QString m_packageId;
QString m_displayName;
QString m_installedVersion;
QString m_candidateVersion;
QString m_changeLog;
bool m_updateAvailable = false;
bool m_rollbackAvailable = false;
bool m_canRemove = false;
};
#endif // PACKAGE_H