C

RequestDataCallback Class

class Qul::PlatformInterface::ImageDecoder::RequestDataCallback

The RequestDataCallback class provides an abstract API for requesting data by an image decoder. More...

This class was introduced in Qt Quick Ultralite (Platform) 2.7.

Public Functions

virtual const unsigned char *rawData() = 0
virtual uint32_t readData(unsigned char *buffer, uint32_t offset, uint32_t size) = 0
virtual uint32_t totalAvailableDataSize() = 0

Detailed Description

See also Qul::PlatformInterface::ImageDecoder.

Member Function Documentation

[pure virtual] const unsigned char *RequestDataCallback::rawData()

Returns a pointer to the raw data of this resource.

In case the resource is available in addressable memory, like Flash, a pointer to this memory can be returned directly. This is useful because an image decoder can optimize for this case to avoid allocating buffers for temporary storage of the data. If the data is not available in addressable memory, when read from a filesystem, NULL is returned.

[pure virtual] uint32_t RequestDataCallback::readData(unsigned char *buffer, uint32_t offset, uint32_t size)

Requests data to be read from the image data.

Data of given size should be read from offset in the data source into buffer. The provided buffer has to be big enough to hold the requested size.

The actual amount of bytes available in the buffer is returned, which can be less than requested in case there was not enough data available.

[pure virtual] uint32_t RequestDataCallback::totalAvailableDataSize()

Returns the amount total available data for this resource.

Available under certain Qt licenses.
Find out more.