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

Encapsulates a download task. More...

Inherits IDisposable.

Public Member Functions

virtual void Destroy ()
 Must be called when the client is ready with the download to free the resources associated with it If the download is not yet complete this implies a Cancel operation Calling any method after Finish is undefined. More...
 
virtual uint GetId ()
 An opaque id of the download. Ids are unique per-context per-session and can be used to distinguish downloads poinitng to the same resource. More...
 
virtual bool Cancel ()
 Cancels a download task. More...
 
virtual string GetURL ()
 The download url. More...
 
virtual string GetFilename ()
 The name of the downloaded file. More...
 
virtual string GetReferrer ()
 The referrer of the download. More...
 
virtual uint GetTotalBytes ()
 The estimated size of the download. More...
 
virtual uint GetDownloadedBytesSoFar ()
 The bytes downloaded so far. NB. Downloads are completed asynchronously, this is an estimation and might not be up-to-date. More...
 
virtual bool IsComplete ()
 Tells if the download is complete. More...
 
virtual bool IsCancelled ()
 Tells if the download has been cancelled. More...
 
virtual bool HasFailed ()
 Tells if the download has failed. More...
 

Detailed Description

Encapsulates a download task.

Member Function Documentation

virtual bool Coherent.UI.Download.Cancel ( )
inlinevirtual

Cancels a download task.

Returns
true if the task has been cancelled. Calling Cancel on an already finished or stopped task will return false
virtual void Coherent.UI.Download.Destroy ( )
inlinevirtual

Must be called when the client is ready with the download to free the resources associated with it If the download is not yet complete this implies a Cancel operation Calling any method after Finish is undefined.

virtual uint Coherent.UI.Download.GetDownloadedBytesSoFar ( )
inlinevirtual

The bytes downloaded so far. NB. Downloads are completed asynchronously, this is an estimation and might not be up-to-date.

Returns
the bytes downloaded so far
virtual string Coherent.UI.Download.GetFilename ( )
inlinevirtual

The name of the downloaded file.

Returns
the name of the file being doenloaded
virtual uint Coherent.UI.Download.GetId ( )
inlinevirtual

An opaque id of the download. Ids are unique per-context per-session and can be used to distinguish downloads poinitng to the same resource.

Returns
a unique id of the download
virtual string Coherent.UI.Download.GetReferrer ( )
inlinevirtual

The referrer of the download.

Returns
the referrer
virtual uint Coherent.UI.Download.GetTotalBytes ( )
inlinevirtual

The estimated size of the download.

Returns
the estimated size in bytes
virtual string Coherent.UI.Download.GetURL ( )
inlinevirtual

The download url.

Returns
the url to download
virtual bool Coherent.UI.Download.HasFailed ( )
inlinevirtual

Tells if the download has failed.

Returns
if the download has failed
virtual bool Coherent.UI.Download.IsCancelled ( )
inlinevirtual

Tells if the download has been cancelled.

Returns
if the download has been cancelled
virtual bool Coherent.UI.Download.IsComplete ( )
inlinevirtual

Tells if the download is complete.

Returns
if the download is complete