Files
OpenVulkano/openVulkanoCpp/Host/WebResourceLoader.hpp
Vladyslav Baranovskyi 48607813a5 WebResourceLoader class
IMPORTANT: The class cannot download from https:// sources because OpenSSL is turned off in curl CMakeLists.txt
2024-06-16 18:48:05 +03:00

28 lines
706 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "ResourceLoader.hpp"
#include <string>
#include <filesystem>
namespace OpenVulkano
{
class WebResourceLoader : public ResourceLoader
{
std::filesystem::path m_cacheDirectory;
std::filesystem::path GetCacheFilePath(const std::string& url);
Array<char> DownloadResource(const std::string& url);
bool IsUrl(const std::string& str);
public:
WebResourceLoader();
~WebResourceLoader();
Array<char> GetResource(const std::string& resourceName) override;
};
}