Retrieves a block of binary data for use on the UI. Used by e.g. fonts.
Public Member Functions | |
| DataPackage (string src, string relativeTo) | |
| Creates a new package to get the named file. You must then call Get to perform the request. More... | |
| void | Get (OnDataReady ready) |
| Sends the request off and defines a callback to run when the result is ready. More... | |
| void | GotData (byte[] data) |
| Got data is called by the file handler when the response is received. More... | |
| void | GotData (byte[] data, string error) |
| Got data is called by the file handler when the response is received. More... | |
Public Attributes | |
| byte[] | Data |
| The data that was retrieved. You must check if it is Ok first. More... | |
| string | Error |
| Any error that occured. More... | |
| FilePath | File |
| The file that was requested. More... | |
| string | FileType |
| The type of file that was requested (e.g. "woff" or "ttf") More... | |
| object | ExtraData |
| A custom data object for passing anything else when the callback runs. More... | |
Properties | |
| string | Url [get] |
| The fully resolved URL requested. More... | |
| bool | Ok [get] |
| True if there is no error and the data is ok. More... | |
| bool | Errored [get] |
| True if there was an error and the data is not ok. More... | |
Events | |
| OnDataReady | Ready |
| The callback to run when complete. More... | |
Private Member Functions | |
| void | SetPath (string src, string relativeTo) |
| Sets up the filepath to the given url which may be relative to a given location. More... | |
|
inline |
Creates a new package to get the named file. You must then call Get to perform the request.
| src | The file to get. |
| relativeTo | The path the file to get is relative to, if any (may be null). |
|
inline |
Sends the request off and defines a callback to run when the result is ready.
| ready | The callback to run. Note that the callback must check if the result is Ok. |
|
inline |
Got data is called by the file handler when the response is received.
| data | The data that was recieved. |
|
inline |
Got data is called by the file handler when the response is received.
| data | The data that was recieved, if any. |
| error | An error that occured, if any. |
|
inlineprivate |
Sets up the filepath to the given url which may be relative to a given location.
| src | The file to get. |
| relativeTo | The path the file to get is relative to, if any. May be null. |
| byte [] PowerUI.DataPackage.Data |
The data that was retrieved. You must check if it is Ok first.
| string PowerUI.DataPackage.Error |
Any error that occured.
| object PowerUI.DataPackage.ExtraData |
A custom data object for passing anything else when the callback runs.
| FilePath PowerUI.DataPackage.File |
The file that was requested.
| string PowerUI.DataPackage.FileType |
The type of file that was requested (e.g. "woff" or "ttf")
|
get |
True if there was an error and the data is not ok.
|
get |
True if there is no error and the data is ok.
|
get |
The fully resolved URL requested.
| OnDataReady PowerUI.DataPackage.Ready |
The callback to run when complete.