Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::LoadImageTaskHttp Class Reference

A resource loading task that can be used to retrieve an image from the network using HTTP or HTTPS. More...

#include <load_image_task_http.hpp>

Inheritance diagram for kanzi::connect::LoadImageTaskHttp:
kanzi::connect::LoadImageTask

Public Member Functions

virtual void loadFunction (const KzuResourceLoaderThreadContext *context) override
 A function that performs the resource loading. More...
 
 LoadImageTaskHttp (const string &url, Domain *domain)
 Constructor. More...
 
virtual ~LoadImageTaskHttp ()=default
 dtor More...
 
- Public Member Functions inherited from kanzi::connect::LoadImageTask
virtual void finishFunction (const KzuResourceLoaderThreadContext *context) override
 A function that is called when the loading is finished. More...
 
virtual ResourceSharedPtr getResult () override
 A function that is called to retrieve the result of the loading. More...
 
 LoadImageTask (const string &url, Domain *domain)
 Constructor. More...
 
virtual ~LoadImageTask ()=default
 Desctructor. More...
 

Additional Inherited Members

- Protected Types inherited from kanzi::connect::LoadImageTask
enum  ImageType { ImageType::JPG, ImageType::PNG, ImageType::UNSUPPORTED }
 Specifies the supported file types. More...
 
- Protected Member Functions inherited from kanzi::connect::LoadImageTask
virtual void decodeKanziBitmap (const KzuResourceLoaderThreadContext *context)
 
 LoadImageTask (const LoadImageTask &other)=delete
 No copying. More...
 
LoadImageTaskoperator= (const LoadImageTask &other)=delete
 No assignment. More...
 
- Static Protected Member Functions inherited from kanzi::connect::LoadImageTask
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...
 
- Protected Attributes inherited from kanzi::connect::LoadImageTask
Domain * m_domain
 
BitmapImageUniquePtr m_image
 
vector< char > m_imageData
 
int m_loadResult
 
bool m_statusReported
 
TextureSharedPtr m_texture
 
string m_url
 

Detailed Description

A resource loading task that can be used to retrieve an image from the network using HTTP or HTTPS.

Constructor & Destructor Documentation

◆ LoadImageTaskHttp()

kanzi::connect::LoadImageTaskHttp::LoadImageTaskHttp ( const string &  url,
Domain *  domain 
)
explicit

Constructor.

Parameters
urlHTTP URL of the resource.
domainKanzi UI Domain.

◆ ~LoadImageTaskHttp()

virtual kanzi::connect::LoadImageTaskHttp::~LoadImageTaskHttp ( )
virtualdefault

dtor

Member Function Documentation

◆ loadFunction()

virtual void kanzi::connect::LoadImageTaskHttp::loadFunction ( const KzuResourceLoaderThreadContext *  context)
overridevirtual

A function that performs the resource loading.

Parameters
contextThread context, unused.

Reimplemented from kanzi::connect::LoadImageTask.


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