2018-11-17 15:36:28 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
#include "UICommon/ResourcePack/Manifest.h"
|
|
|
|
|
|
|
|
namespace ResourcePack
|
|
|
|
{
|
|
|
|
class ResourcePack
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ResourcePack(const std::string& path);
|
|
|
|
|
|
|
|
bool IsValid() const;
|
|
|
|
const std::vector<char>& GetLogo() const;
|
|
|
|
|
|
|
|
const std::string& GetPath() const;
|
|
|
|
const std::string& GetError() const;
|
|
|
|
const Manifest* GetManifest() const;
|
|
|
|
const std::vector<std::string>& GetTextures() const;
|
|
|
|
|
|
|
|
bool Install(const std::string& path);
|
|
|
|
bool Uninstall(const std::string& path);
|
|
|
|
|
2019-03-13 19:53:30 +00:00
|
|
|
bool operator==(const ResourcePack& pack) const;
|
2019-03-13 19:55:16 +00:00
|
|
|
bool operator!=(const ResourcePack& pack) const;
|
2018-11-17 15:36:28 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_valid = true;
|
|
|
|
|
|
|
|
std::string m_path;
|
|
|
|
std::string m_error;
|
|
|
|
|
|
|
|
std::shared_ptr<Manifest> m_manifest;
|
|
|
|
std::vector<std::string> m_textures;
|
|
|
|
std::vector<char> m_logo_data;
|
|
|
|
};
|
|
|
|
} // namespace ResourcePack
|