cesium-native 0.48.0
Loading...
Searching...
No Matches
GunzipAssetAccessor.h
1#pragma once
2
3#include <CesiumAsync/IAssetAccessor.h>
4#include <CesiumAsync/IAssetRequest.h>
5
6namespace CesiumAsync {
7class AsyncSystem;
8
14public:
21 GunzipAssetAccessor(const std::shared_ptr<IAssetAccessor>& pAssetAccessor);
22
23 virtual ~GunzipAssetAccessor() noexcept override;
24
26 virtual Future<std::shared_ptr<IAssetRequest>>
27 get(const AsyncSystem& asyncSystem,
28 const std::string& url,
29 const std::vector<THeader>& headers) override;
30
31 virtual Future<std::shared_ptr<IAssetRequest>> request(
32 const AsyncSystem& asyncSystem,
33 const std::string& verb,
34 const std::string& url,
35 const std::vector<THeader>& headers,
36 const std::span<const std::byte>& contentPayload) override;
37
39 virtual void tick() noexcept override;
40
41private:
42 std::shared_ptr<IAssetAccessor> _pAssetAccessor;
43};
44} // namespace CesiumAsync
A system for managing asynchronous requests and tasks.
Definition AsyncSystem.h:36
A value that will be available in the future, as produced by AsyncSystem.
Definition Future.h:29
virtual void tick() noexcept override
Ticks the asset accessor system while the main thread is blocked.
virtual Future< std::shared_ptr< IAssetRequest > > request(const AsyncSystem &asyncSystem, const std::string &verb, const std::string &url, const std::vector< THeader > &headers, const std::span< const std::byte > &contentPayload) override
Starts a new request to the given URL, using the provided HTTP verb and the provided content payload.
virtual Future< std::shared_ptr< IAssetRequest > > get(const AsyncSystem &asyncSystem, const std::string &url, const std::vector< THeader > &headers) override
Starts a new request for the asset with the given URL. The request proceeds asynchronously without bl...
GunzipAssetAccessor(const std::shared_ptr< IAssetAccessor > &pAssetAccessor)
Constructs a new instance.
Provides asynchronous access to assets, usually files downloaded via HTTP.
std::pair< std::string, std::string > THeader
An HTTP header represented as a key/value pair.
An asynchronous request for an asset, usually a file downloaded via HTTP.
Classes that support asynchronous operations.
STL namespace.