Abstract interface for responding to read resource requests.
More...
#include <Coherent/UI/FileHandler.h>
Abstract interface for responding to read resource requests.
virtual void* Coherent::UI::ResourceResponse::GetBuffer |
( |
unsigned long |
size | ) |
|
|
pure virtual |
Request buffer for resource data.
- Warning
- GetBuffer must be called only once.
- Note
- GetBuffer may be called in any thread.
- Parameters
-
size | the size of the resource |
- Returns
- pointer to the beginning of the buffer. It may return nullptr when allocating the buffer has failed
virtual void Coherent::UI::ResourceResponse::SetResponseHeader |
( |
const char * |
key, |
|
|
const char * |
value |
|
) |
| |
|
pure virtual |
Set a key-value pair in the response headers.
- Parameters
-
key | the key for the response header |
value | the value for the response header |
virtual void Coherent::UI::ResourceResponse::SetStatus |
( |
int |
status | ) |
|
|
pure virtual |
Set the status for the response.
- Parameters
-
status | the response status |
virtual void Coherent::UI::ResourceResponse::SignalFailure |
( |
| ) |
|
|
pure virtual |
Report that resource reading has failed.
- Warning
- This should be executed in the thread that all Coherent UI methods are executed.
-
After this method is called, any calls to any method of the instance are undefined behavior.
virtual void Coherent::UI::ResourceResponse::SignalSuccess |
( |
| ) |
|
|
pure virtual |
Report that the resource is read successfully.
- Warning
- This should be executed in the thread that all Coherent UI methods are executed.
-
After this method is called, any calls to any method of the instance are undefined behavior.