cesium-native 0.43.0
Loading...
Searching...
No Matches
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 CesiumGltfReader::NetworkSchemaAssetDescriptor

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.
 
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.
 

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.

Member Data Documentation

◆ headers

std::vector<IAssetAccessor::THeader> CesiumAsync::NetworkAssetDescriptor::headers

The HTTP headers used in requesting this asset.

Definition at line 29 of file NetworkAssetDescriptor.h.

◆ url

std::string CesiumAsync::NetworkAssetDescriptor::url

The URL from which this network asset is downloaded.

Definition at line 24 of file NetworkAssetDescriptor.h.


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