summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/ResourcePack/ResourcePack.h
blob: 32ef699a793ac914c92f01138e112641e6f6343c (plain)
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
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#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);

  bool operator==(const ResourcePack& pack) const;

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