Detailed Description

A jar to hold any assigned cookies.

Inheritance diagram for PowerUI.Http.CookieJar:
PowerUI.DomainEntry

Public Member Functions

 CookieJar (DomainData domain)
 
void Add (Cookie cookie)
 Add or replace the given cookie in the jar. More...
 
string GetCookieHeader (Location forPath)
 Builds a header-friendly string. More...
 
void Empty ()
 Empties the jar. More...
 
override void LoadFromJson (Json.JSObject obj)
 Loads this data from JSON. More...
 
override Json.JSObject ToJson ()
 Converts this domain data into a JSON object. Null if it's empty. More...
 
- Public Member Functions inherited from PowerUI.DomainEntry
 DomainEntry (DomainData domain)
 
void Save ()
 Saves this data now. More...
 

Static Public Member Functions

static CookieJar Get (string domain)
 Gets the cookie jar for the given domain. Recursively checks parent domains. More...
 
static CookieJar Get (string domain, bool create)
 Gets the cookie jar for the given domain. Recursively checks parent domains. Optionally creates one if it wasn't found. More...
 

Public Attributes

Dictionary< string, CookieCookieSet =new Dictionary<string,Cookie>()
 The cookies. More...
 
- Public Attributes inherited from PowerUI.DomainEntry
DomainData Domain
 The domain that this entry is part of. More...
 

Properties

override bool IsEmpty [get]
 
override string JsonIndex [get]
 
- Properties inherited from PowerUI.DomainEntry
string Host [get]
 
virtual string JsonIndex [get]
 The index used in the JSON data. More...
 
virtual bool IsEmpty [get]
 True if this entry has no useful information inside it. More...
 

Constructor & Destructor Documentation

PowerUI.Http.CookieJar.CookieJar ( DomainData  domain)
inline

Member Function Documentation

void PowerUI.Http.CookieJar.Add ( Cookie  cookie)
inline

Add or replace the given cookie in the jar.

void PowerUI.Http.CookieJar.Empty ( )
inline

Empties the jar.

static CookieJar PowerUI.Http.CookieJar.Get ( string  domain)
inlinestatic

Gets the cookie jar for the given domain. Recursively checks parent domains.

static CookieJar PowerUI.Http.CookieJar.Get ( string  domain,
bool  create 
)
inlinestatic

Gets the cookie jar for the given domain. Recursively checks parent domains. Optionally creates one if it wasn't found.

string PowerUI.Http.CookieJar.GetCookieHeader ( Location  forPath)
inline

Builds a header-friendly string.

override void PowerUI.Http.CookieJar.LoadFromJson ( Json.JSObject  obj)
inlinevirtual

Loads this data from JSON.

Reimplemented from PowerUI.DomainEntry.

override Json.JSObject PowerUI.Http.CookieJar.ToJson ( )
inlinevirtual

Converts this domain data into a JSON object. Null if it's empty.

Reimplemented from PowerUI.DomainEntry.

Member Data Documentation

Dictionary<string,Cookie> PowerUI.Http.CookieJar.CookieSet =new Dictionary<string,Cookie>()

The cookies.

Property Documentation

override bool PowerUI.Http.CookieJar.IsEmpty
get
override string PowerUI.Http.CookieJar.JsonIndex
get