ResourcePack.h 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2018 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <memory>
  5. #include <string>
  6. #include <vector>
  7. #include "Common/CommonTypes.h"
  8. #include "UICommon/ResourcePack/Manifest.h"
  9. namespace ResourcePack
  10. {
  11. class ResourcePack
  12. {
  13. public:
  14. explicit ResourcePack(const std::string& path);
  15. bool IsValid() const;
  16. const std::vector<char>& GetLogo() const;
  17. const std::string& GetPath() const;
  18. const std::string& GetError() const;
  19. const Manifest* GetManifest() const;
  20. const std::vector<std::string>& GetTextures() const;
  21. bool Install(const std::string& path);
  22. bool Uninstall(const std::string& path);
  23. bool operator==(const ResourcePack& pack) const;
  24. private:
  25. bool m_valid = true;
  26. std::string m_path;
  27. std::string m_error;
  28. std::shared_ptr<Manifest> m_manifest;
  29. std::vector<std::string> m_textures;
  30. std::vector<char> m_logo_data;
  31. };
  32. } // namespace ResourcePack