#pragma once #include #include #include #include #include #include #include #include namespace hex::plugin::builtin { struct StoreEntry { std::string name; std::string description; std::string fileName; std::string link; std::string hash; bool isFolder; bool downloading; bool installed; bool hasUpdate; }; class ViewStore : public View { public: ViewStore(); ~ViewStore() override; void drawContent() override; void drawMenu() override; [[nodiscard]] bool isAvailable() const override { return true; } [[nodiscard]] bool hasViewMenuItemEntry() const override { return false; } private: Net m_net; std::future> m_apiRequest; std::future> m_download; fs::path m_downloadPath; std::vector m_patterns, m_includes, m_magics, m_constants, m_yara; void drawStore(); void refresh(); void parseResponse(); void download(ImHexPath pathType, const std::string &fileName, const std::string &url, bool update); void remove(ImHexPath pathType, const std::string &fileName); }; }