PowerUI.HttpProtocol Class Reference

Detailed Description

Handles the http:// protocol. Downloads files and text from the web and also handles web links. Note that this protocol (and many others) have been designed to be removeable - just delete the file.

Inheritance diagram for PowerUI.HttpProtocol:
PowerUI.FileProtocol

Public Member Functions

override 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...
 
override void OnFollowLink (HtmlElement linkElement, Location path)
 The user clicked on the given link which points to the given path. More...
 
override CachedContent GetCached (Dom.Location location)
 Attempts to get cached data for the given location. More...
 
override void OnGetDataNow (ContentPackage package)
 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. Note that you can call this directly to avoid all cache checking. More...
 
- Public Member Functions inherited from PowerUI.FileProtocol
virtual DomainData GetDomain (Dom.Location location)
 Gets the domain data for the given location. More...
 
virtual string GetRelative (Dom.Location location)
 Gets the relative path for the given location. More...
 
CachedContent GetCached (Dom.Location location, bool create)
 Attempts to get cached data for the given location. More...
 
virtual string ContentType (Location path)
 Used to determine the content type for the file from the given path. More...
 
virtual bool FullAccess (Location 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...
 
void OnGetData (ContentPackage package)
 Gets binary data, checking the cache first. More...
 
virtual void OnGetGraphic (ImagePackage package)
 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 OnGetAudio (AudioPackage package)
 Get the file at the given path as any supported audio format. Once it's been retrieved, this must call package.GotAudio(theObject) internally. More...
 

Additional Inherited Members

- Static Public Attributes inherited from PowerUI.FileProtocol
static InternalEventHandler OnRequestStarted
 An event called when any request is started. Useful for debugging networking (and is used by the network inspector). More...
 

Member Function Documentation

override CachedContent PowerUI.HttpProtocol.GetCached ( Dom.Location  location)
inlinevirtual

Attempts to get cached data for the given location.

Reimplemented from PowerUI.FileProtocol.

override string [] PowerUI.HttpProtocol.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 from PowerUI.FileProtocol.

override void PowerUI.HttpProtocol.OnFollowLink ( HtmlElement  linkElement,
Location  path 
)
inlinevirtual

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

Reimplemented from PowerUI.FileProtocol.

override void PowerUI.HttpProtocol.OnGetDataNow ( ContentPackage  package)
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. Note that you can call this directly to avoid all cache checking.

Reimplemented from PowerUI.FileProtocol.