A resource loading task that can be used to retrieve an image from the network using HTTP or HTTPS.
More...
#include <load_image_task.hpp>
|
| static ImageType | detectImageType (const unsigned char *buffer, size_t lenght) |
| | Detect image type based on buffer contents. More...
|
| |
| static bool | isJpgImage (const unsigned char *buffer, size_t size) |
| | Check if the given buffer contains a valid signature for JPG file. More...
|
| |
| static bool | isPngImage (const unsigned char *buffer, size_t size) |
| | Check if the given buffer contains a valid signature for PNG file. More...
|
| |
A resource loading task that can be used to retrieve an image from the network using HTTP or HTTPS.
◆ ImageType
Specifies the supported file types.
| Enumerator |
|---|
| JPG | |
| PNG | |
| UNSUPPORTED | |
◆ LoadImageTask() [1/2]
| kanzi::connect::LoadImageTask::LoadImageTask |
( |
const string & |
url, |
|
|
Domain * |
domain |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
| url | HTTP url of the resource. |
| domain | Kanzi UI Domain. |
◆ ~LoadImageTask()
| virtual kanzi::connect::LoadImageTask::~LoadImageTask |
( |
| ) |
|
|
virtualdefault |
◆ LoadImageTask() [2/2]
| kanzi::connect::LoadImageTask::LoadImageTask |
( |
const LoadImageTask & |
other | ) |
|
|
protected |
◆ decodeKanziBitmap()
| virtual void kanzi::connect::LoadImageTask::decodeKanziBitmap |
( |
const KzuResourceLoaderThreadContext * |
context | ) |
|
|
protectedvirtual |
◆ detectImageType()
| static ImageType kanzi::connect::LoadImageTask::detectImageType |
( |
const unsigned char * |
buffer, |
|
|
size_t |
lenght |
|
) |
| |
|
staticprotected |
Detect image type based on buffer contents.
- Parameters
-
◆ finishFunction()
| virtual void kanzi::connect::LoadImageTask::finishFunction |
( |
const KzuResourceLoaderThreadContext * |
context | ) |
|
|
virtual |
A function that is called when the loading is finished.
- Parameters
-
| context | Thread context, unused |
◆ getResult()
A function that is called to retrieve the result of the loading.
- Returns
- A shared pointer to the resource that was loaded.
◆ isJpgImage()
| static bool kanzi::connect::LoadImageTask::isJpgImage |
( |
const unsigned char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
staticprotected |
Check if the given buffer contains a valid signature for JPG file.
- Parameters
-
◆ isPngImage()
| static bool kanzi::connect::LoadImageTask::isPngImage |
( |
const unsigned char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
staticprotected |
Check if the given buffer contains a valid signature for PNG file.
- Parameters
-
◆ loadFunction()
| virtual void kanzi::connect::LoadImageTask::loadFunction |
( |
const KzuResourceLoaderThreadContext * |
context | ) |
|
|
virtual |
◆ operator=()
◆ m_domain
| Domain* kanzi::connect::LoadImageTask::m_domain |
|
protected |
◆ m_image
| BitmapImageUniquePtr kanzi::connect::LoadImageTask::m_image |
|
protected |
◆ m_imageData
| vector<char> kanzi::connect::LoadImageTask::m_imageData |
|
protected |
◆ m_loadResult
| int kanzi::connect::LoadImageTask::m_loadResult |
|
protected |
◆ m_memoryManager
| KzcMemoryManager* kanzi::connect::LoadImageTask::m_memoryManager |
|
protected |
◆ m_statusReported
| bool kanzi::connect::LoadImageTask::m_statusReported |
|
protected |
◆ m_texture
| TextureSharedPtr kanzi::connect::LoadImageTask::m_texture |
|
protected |
◆ m_url
| string kanzi::connect::LoadImageTask::m_url |
|
protected |
The documentation for this class was generated from the following file:
- connect/kanzi_adaptation/load_image_task.hpp