cesium-native  0.41.0
CesiumAsync::NetworkAssetDescriptor Struct Reference

A description of an asset that can be loaded from the network using an IAssetAccessor. This includes a URL and any headers to be included in the request. More...

#include <CesiumAsync/NetworkAssetDescriptor.h>

Inheritance diagram for CesiumAsync::NetworkAssetDescriptor:
CesiumGltfReader::NetworkImageAssetDescriptor

Public Member Functions

bool operator== (const NetworkAssetDescriptor &rhs) const noexcept
 Determines if this descriptor is identical to another one.
 
Future< std::shared_ptr< CesiumAsync::IAssetRequest > > loadFromNetwork (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< IAssetAccessor > &pAssetAccessor) const
 Request this asset from the network using the provided asset accessor. More...
 
Future< CesiumUtility::Result< std::vector< std::byte > > > loadBytesFromNetwork (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< IAssetAccessor > &pAssetAccessor) const
 Request this asset from the network using the provided asset accessor and return the downloaded bytes. More...
 

Public Attributes

std::string url
 The URL from which this network asset is downloaded.
 
std::vector< IAssetAccessor::THeaderheaders
 The HTTP headers used in requesting this asset.
 

Detailed Description

A description of an asset that can be loaded from the network using an IAssetAccessor. This includes a URL and any headers to be included in the request.

Definition at line 20 of file NetworkAssetDescriptor.h.

Member Function Documentation

◆ loadBytesFromNetwork()

Future<CesiumUtility::Result<std::vector<std::byte> > > CesiumAsync::NetworkAssetDescriptor::loadBytesFromNetwork ( const CesiumAsync::AsyncSystem asyncSystem,
const std::shared_ptr< IAssetAccessor > &  pAssetAccessor 
) const

Request this asset from the network using the provided asset accessor and return the downloaded bytes.

Parameters
asyncSystemThe async system.
pAssetAccessorThe asset accessor.
Returns
A future that resolves to the downloaded bytes once the request is complete.

◆ loadFromNetwork()

Future<std::shared_ptr<CesiumAsync::IAssetRequest> > CesiumAsync::NetworkAssetDescriptor::loadFromNetwork ( const CesiumAsync::AsyncSystem asyncSystem,
const std::shared_ptr< IAssetAccessor > &  pAssetAccessor 
) const

Request this asset from the network using the provided asset accessor.

Parameters
asyncSystemThe async system.
pAssetAccessorThe asset accessor.
Returns
A future that resolves to the request once it is complete.

The documentation for this struct was generated from the following file: