2020-05-17 20:26:31 +02:00
|
|
|
/****************************************************************************
|
2022-05-14 12:06:16 +02:00
|
|
|
* Copyright (C) 2019-2022 Maschell
|
2020-05-17 20:26:31 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-02-13 16:12:10 +01:00
|
|
|
#include <optional>
|
2020-05-17 20:26:31 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class PluginMetaInformation {
|
|
|
|
public:
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getName() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getAuthor() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->author;
|
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getVersion() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->version;
|
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getLicense() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->license;
|
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getBuildTimestamp() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->buildtimestamp;
|
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
[[nodiscard]] const std::string &getDescription() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->description;
|
|
|
|
}
|
|
|
|
|
2021-10-01 17:25:19 +02:00
|
|
|
[[nodiscard]] const std::string &getStorageId() const {
|
|
|
|
return this->storageId;
|
2021-04-07 23:36:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
[[nodiscard]] size_t getSize() const {
|
2020-05-17 20:26:31 +02:00
|
|
|
return this->size;
|
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
PluginMetaInformation(std::string name,
|
|
|
|
std::string author,
|
|
|
|
std::string version,
|
|
|
|
std::string license,
|
|
|
|
std::string buildtimestamp,
|
|
|
|
std::string description,
|
|
|
|
std::string storageId,
|
2020-05-17 20:26:31 +02:00
|
|
|
size_t size);
|
|
|
|
|
|
|
|
private:
|
2021-04-07 23:36:30 +02:00
|
|
|
PluginMetaInformation() = default;
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setName(std::string name_) {
|
|
|
|
this->name = std::move(name_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setAuthor(std::string author_) {
|
|
|
|
this->author = std::move(author_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setVersion(std::string version_) {
|
|
|
|
this->version = std::move(version_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setLicense(std::string license_) {
|
|
|
|
this->license = std::move(license_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setBuildTimestamp(std::string buildtimestamp_) {
|
|
|
|
this->buildtimestamp = std::move(buildtimestamp_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setDescription(std::string description_) {
|
|
|
|
this->description = std::move(description_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2022-05-14 12:06:16 +02:00
|
|
|
void setStorageId(std::string storageId_) {
|
|
|
|
this->storageId = std::move(storageId_);
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
2021-04-07 23:36:30 +02:00
|
|
|
void setSize(size_t size_) {
|
|
|
|
this->size = size_;
|
2020-05-17 20:26:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string name;
|
|
|
|
std::string author;
|
|
|
|
std::string version;
|
|
|
|
std::string license;
|
|
|
|
std::string buildtimestamp;
|
|
|
|
std::string description;
|
2021-10-01 17:25:19 +02:00
|
|
|
std::string storageId;
|
2021-04-07 23:36:30 +02:00
|
|
|
size_t size{};
|
2020-05-17 20:26:31 +02:00
|
|
|
};
|