neuray Services API Programmer's Manual

mi::nservices::IHttp_reader Class Reference

Description

IReader implementation used for streaming the http response body.

Public Member Functions

virtual IHttp_readerget_relative_reader( const char* uri, Http_reader_open_mode mode, mi::neuraylib::IProgress_callback* progress = nullptr) const =0
Returns a reader for a URI relative to this reader's URI. More...
virtual const IHttp_responseget_response() const =0
Gets the IHttp_response object associated with the reader. More...
virtual const mi::neuraylib::IImport_resultimport_relative_scene_elements( mi::neuraylib::ITransaction* transaction, const char* uri, const mi::IMap* importer_options = 0, const mi::neuraylib::IImpexp_state* parent_state = 0) const =0
Imports scene elements via the IHttp_import_api using the base url of the reader.

Member Functions

virtual IHttp_reader* mi::​nservices::​IHttp_reader::get_relative_reader( const char* uri, Http_reader_open_mode mode, mi::neuraylib::IProgress_callback* progress = nullptr) const [pure virtual]

Returns a reader for a URI relative to this reader's URI.

Parameters

uri
The URI of the new reader relative to this reader's URI.
mode
Flags used for opening the http reader stream.
progress
Optional callback for reporting download progress.

Returns

The http response for the request associated with this reader.

virtual const IHttp_response* mi::​nservices::​IHttp_reader::get_response() const [pure virtual]

Gets the IHttp_response object associated with the reader. Note that the response body is inaccessible through this object and will return NULL.

Returns

The http response for the request associated with this reader.

virtual const mi::neuraylib::IImport_result* mi::​nservices::​IHttp_reader::import_relative_scene_elements( mi::neuraylib::ITransaction* transaction, const char* uri, const mi::IMap* importer_options = 0, const mi::neuraylib::IImpexp_state* parent_state = 0) const [pure virtual]

Imports scene elements via the IHttp_import_api using the base url of the reader.