| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
#include <string> |
| 8 |
#include <vector> |
| 9 |
|
| 10 |
#include "Common/CommonTypes.h" |
| 11 |
|
| 12 |
#include "UICommon/ResourcePack/Manifest.h" |
| 13 |
|
| 14 |
namespace ResourcePack |
| 15 |
{ |
| 16 |
class ResourcePack |
| 17 |
{ |
| 18 |
public: |
| 19 |
explicit ResourcePack(const std::string& path); |
| 20 |
|
| 21 |
bool IsValid() const; |
| 22 |
const std::vector<char>& GetLogo() const; |
| 23 |
|
| 24 |
const std::string& GetPath() const; |
| 25 |
const std::string& GetError() const; |
| 26 |
const Manifest* GetManifest() const; |
| 27 |
const std::vector<std::string>& GetTextures() const; |
| 28 |
|
| 29 |
bool Install(const std::string& path); |
| 30 |
bool Uninstall(const std::string& path); |
| 31 |
|
| 32 |
bool operator==(const ResourcePack& pack) const; |
| 33 |
|
| 34 |
private: |
| 35 |
bool m_valid = true; |
| 36 |
|
| 37 |
std::string m_path; |
| 38 |
std::string m_error; |
| 39 |
|
| 40 |
std::shared_ptr<Manifest> m_manifest; |
| 41 |
std::vector<std::string> m_textures; |
| 42 |
std::vector<char> m_logo_data; |
| 43 |
}; |
| 44 |
} |