| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/idatasource.h" |
| 7 | #include <filesystem> |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | class ZipDataSource final |
| 12 | : public IDataSource<std::string const, std::vector<char>> |
| 13 | { |
| 14 | public: |
| 15 | ZipDataSource(std::filesystem::path const &path) noexcept; |
| 16 | |
| 17 | std::string source() const override; |
| 18 | bool read(std::string const &internalBundleDataPath, |
| 19 | std::vector<char> &data) override; |
| 20 | |
| 21 | private: |
| 22 | std::filesystem::path const path_; |
| 23 | }; |