Coherent GT  1.11.0
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Groups Pages
Coherent::UIGT::ResourceResponseUIGT Class Referenceabstract

Objects of this type are used from the client to read resources requested by the UI system. More...

#include <Coherent/Coherent/UIGT/ResourceResponseUIGT.h>

Public Member Functions

virtual void SetStatus (int status)=0
 Sets the response status. More...
 
virtual void SetExpectedLength (const long long int bytes)=0
 Sets the length of the resources read. More...
 
virtual void SetResponseHeader (const char *key, const char *value)=0
 Set a key-value pair in the response headers. More...
 
virtual void SetMimeType (const char *mimeType)=0
 Set the mime type for this response. More...
 
virtual void ReceiveData (const char *buffer, long long int bytes)=0
 Passes the data read to the UI system. More...
 
virtual void ReceivePreloadedImage (const PreloadedImageData &preloadedData)=0
 Passes data about a preloaded image that is ready to be used the UI system. This lets Coherent GT use textures that have already been decoded instead of decoding them internally. More...
 
virtual void SignalSuccess ()=0
 Signals the UI system that the resource was successfully read.
 
virtual void SignalFailure ()=0
 Signals the UI system that the resource read failed.
 
virtual void Release ()=0
 Releases the memory for this response. You MUST call release on this object after you've read the resource, otherwise memory leaks will occur.
 

Detailed Description

Objects of this type are used from the client to read resources requested by the UI system.

Member Function Documentation

virtual void Coherent::UIGT::ResourceResponseUIGT::ReceiveData ( const char *  buffer,
long long int  bytes 
)
pure virtual

Passes the data read to the UI system.

Parameters
bufferpointer to the raw data read
bytesthe size of the buffer
Note
this method MUST be called after all the needed headers and status are set
Warning
calling this method after you've already called ReceivePreloadedImage will result in an error
virtual void Coherent::UIGT::ResourceResponseUIGT::ReceivePreloadedImage ( const PreloadedImageData &  preloadedData)
pure virtual

Passes data about a preloaded image that is ready to be used the UI system. This lets Coherent GT use textures that have already been decoded instead of decoding them internally.

Parameters
preloadedDatainformation about the preloaded image
Note
this method MUST be called after all the needed headers and status are set
Warning
calling this method after you've already called ReceiveData will result in an error
virtual void Coherent::UIGT::ResourceResponseUIGT::SetExpectedLength ( const long long int  bytes)
pure virtual

Sets the length of the resources read.

Parameters
bytesthe expected content length, in bytes
virtual void Coherent::UIGT::ResourceResponseUIGT::SetMimeType ( const char *  mimeType)
pure virtual

Set the mime type for this response.

Parameters
mimeTypethe mime type
virtual void Coherent::UIGT::ResourceResponseUIGT::SetResponseHeader ( const char *  key,
const char *  value 
)
pure virtual

Set a key-value pair in the response headers.

Parameters
keythe key for the response header
valuethe value for the response header
virtual void Coherent::UIGT::ResourceResponseUIGT::SetStatus ( int  status)
pure virtual

Sets the response status.

Parameters
statusthe response status
Note
MUST be called before |ReceiveData|