Coherent UI for .NET  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Coherent.UI.ResourceResponse Class Reference

Abstract interface for responding to read resource requests. More...

Inherits IDisposable.

Public Member Functions

virtual IntPtr GetBuffer (uint size)
 Request buffer for resource data. GetBuffer must be called only once. GetBuffer may be called in any thread. More...
 
virtual void SignalSuccess ()
 Report that the resource is read successfully. 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. More...
 
virtual void SignalFailure ()
 Report that resource reading has failed. 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. More...
 
virtual void SetResponseHeader (string key, string value)
 Set a key-value pair in the response headers. More...
 
virtual void SetStatus (int status)
 Set the status for the response. More...
 

Detailed Description

Abstract interface for responding to read resource requests.

Member Function Documentation

virtual IntPtr Coherent.UI.ResourceResponse.GetBuffer ( uint  size)
inlinevirtual

Request buffer for resource data. GetBuffer must be called only once. GetBuffer may be called in any thread.

Parameters
sizethe 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 ( string  key,
string  value 
)
inlinevirtual

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.UI.ResourceResponse.SetStatus ( int  status)
inlinevirtual

Set the status for the response.

Parameters
statusthe response status
virtual void Coherent.UI.ResourceResponse.SignalFailure ( )
inlinevirtual

Report that resource reading has failed. 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 ( )
inlinevirtual

Report that the resource is read successfully. 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.