PowerUI.FileProtocol Class Reference

Detailed Description

Represents a custom protocol:// as used by PowerUI files. For example, if you wish to deliver content in a custom way to PowerUI, implement a new FileProtocol (e.g. 'cdn') Then, setup its OnGetGraphic function.

Inheritance diagram for PowerUI.FileProtocol:
PowerUI.CacheProtocol PowerUI.DynamicProtocol PowerUI.HttpProtocol PowerUI.ResourcesProtocol PowerUI.SceneProtocol PowerUI.ResizeProtocol

Public Member Functions

virtual string[] GetNames ()
 Returns all protocol names:// that can be used for this protocol. e.g. new string[]{"cdn","net"}; => cdn://file.png or net://file.png More...
 
virtual bool FullAccess (FilePath path)
 Does the item at the given location have full access to the code security domain? Used by Nitro. If it does not have full access, the Nitro security domain is asked about the path instead. If you're unsure, leave this false! If your game uses simple web browsing, this essentially stops somebody writing dangerous Nitro on a remote webpage and directing your game at it. More...
 
virtual void OnGetData (DataPackage package, FilePath path)
 Get generic binary at the given path using this protocol. Used for e.g. fonts. Once it's been retrieved, this must call package.GotData(theText) internally. More...
 
virtual void OnGetText (TextPackage package, FilePath path)
 Get the file at the given path as some html text using this protocol. Once it's been retrieved, this must call package.GotText(theText) internally. More...
 
virtual void OnGetGraphic (ImagePackage package, FilePath path)
 Get the file at the given path as a MovieTexture (Unity Pro only!), Texture2D, SPA Animation or DynamicTexture using this protocol. Once it's been retrieved, this must call package.GotGraphic(theObject) internally. More...
 
virtual void OnPostForm (FormData form, Element formElement, FilePath path)
 Submits the given form to the given path using this protocol. More...
 
virtual void OnFollowLink (Element linkElement, FilePath path)
 The user clicked on the given link which points to the given path. More...
 

Public Attributes

bool UseResolution =true
 Should images delivered with this protocol append resolution based names? More...
 

Member Function Documentation

virtual bool PowerUI.FileProtocol.FullAccess ( FilePath  path)
inlinevirtual

Does the item at the given location have full access to the code security domain? Used by Nitro. If it does not have full access, the Nitro security domain is asked about the path instead. If you're unsure, leave this false! If your game uses simple web browsing, this essentially stops somebody writing dangerous Nitro on a remote webpage and directing your game at it.

Reimplemented in PowerUI.ResourcesProtocol.

virtual string [] PowerUI.FileProtocol.GetNames ( )
inlinevirtual

Returns all protocol names:// that can be used for this protocol. e.g. new string[]{"cdn","net"}; => cdn://file.png or net://file.png

Reimplemented in PowerUI.HttpProtocol, PowerUI.ResizeProtocol, PowerUI.DynamicProtocol, PowerUI.ResourcesProtocol, PowerUI.SceneProtocol, and PowerUI.CacheProtocol.

virtual void PowerUI.FileProtocol.OnFollowLink ( Element  linkElement,
FilePath  path 
)
inlinevirtual

The user clicked on the given link which points to the given path.

Reimplemented in PowerUI.ResourcesProtocol, PowerUI.HttpProtocol, and PowerUI.SceneProtocol.

virtual void PowerUI.FileProtocol.OnGetData ( DataPackage  package,
FilePath  path 
)
inlinevirtual

Get generic binary at the given path using this protocol. Used for e.g. fonts. Once it's been retrieved, this must call package.GotData(theText) internally.

Reimplemented in PowerUI.HttpProtocol, and PowerUI.ResourcesProtocol.

virtual void PowerUI.FileProtocol.OnGetGraphic ( ImagePackage  package,
FilePath  path 
)
inlinevirtual

Get the file at the given path as a MovieTexture (Unity Pro only!), Texture2D, SPA Animation or DynamicTexture using this protocol. Once it's been retrieved, this must call package.GotGraphic(theObject) internally.

Reimplemented in PowerUI.HttpProtocol, PowerUI.DynamicProtocol, PowerUI.ResizeProtocol, PowerUI.ResourcesProtocol, and PowerUI.CacheProtocol.

virtual void PowerUI.FileProtocol.OnGetText ( TextPackage  package,
FilePath  path 
)
inlinevirtual

Get the file at the given path as some html text using this protocol. Once it's been retrieved, this must call package.GotText(theText) internally.

Reimplemented in PowerUI.ResourcesProtocol, and PowerUI.HttpProtocol.

virtual void PowerUI.FileProtocol.OnPostForm ( FormData  form,
Element  formElement,
FilePath  path 
)
inlinevirtual

Submits the given form to the given path using this protocol.

Reimplemented in PowerUI.HttpProtocol.

Member Data Documentation

bool PowerUI.FileProtocol.UseResolution =true

Should images delivered with this protocol append resolution based names?