cesium-native
0.41.0
|
A decorator for an IAssetAccessor that automatically unzips gzipped asset responses from the underlying Asset Accessor. More...
#include <CesiumAsync/GunzipAssetAccessor.h>
Public Member Functions | |
GunzipAssetAccessor (const std::shared_ptr< IAssetAccessor > &pAssetAccessor) | |
Constructs a new instance. More... | |
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 blocking the calling thread. More... | |
virtual Future< std::shared_ptr< IAssetRequest > > | request (const AsyncSystem &asyncSystem, const std::string &verb, const std::string &url, const std::vector< THeader > &headers, const gsl::span< const std::byte > &contentPayload) override |
Starts a new request to the given URL, using the provided HTTP verb and the provided content payload. More... | |
virtual void | tick () noexcept override |
Ticks the asset accessor system while the main thread is blocked. More... | |
Additional Inherited Members | |
Public Types inherited from CesiumAsync::IAssetAccessor | |
typedef std::pair< std::string, std::string > | THeader |
An HTTP header represented as a key/value pair. | |
A decorator for an IAssetAccessor that automatically unzips gzipped asset responses from the underlying Asset Accessor.
Definition at line 13 of file GunzipAssetAccessor.h.
CesiumAsync::GunzipAssetAccessor::GunzipAssetAccessor | ( | const std::shared_ptr< IAssetAccessor > & | pAssetAccessor | ) |
Constructs a new instance.
pAssetAccessor | The underlying IAssetAccessor used to retrieve assets that may or may not be zipped. |
|
overridevirtual |
Starts a new request for the asset with the given URL. The request proceeds asynchronously without blocking the calling thread.
asyncSystem | The async system used to do work in threads. |
url | The URL of the asset. |
headers | The headers to include in the request. |
Implements CesiumAsync::IAssetAccessor.
|
overridevirtual |
Starts a new request to the given URL, using the provided HTTP verb and the provided content payload.
The request proceeds asynchronously without blocking the calling thread.
asyncSystem | The async system used to do work in threads. |
verb | The HTTP verb to use, such as "POST" or "PATCH". |
url | The URL of the asset. |
headers | The headers to include in the request. |
contentPayload | The payload data to include in the request. |
Implements CesiumAsync::IAssetAccessor.
|
overridevirtualnoexcept |
Ticks the asset accessor system while the main thread is blocked.
If the asset accessor is not dependent on the main thread to dispatch requests, this method does not need to do anything.
Implements CesiumAsync::IAssetAccessor.