Gnash  0.8.11dev
Typedefs | Enumerations | Functions
gnash::URLAccessManager Namespace Reference

Manage a list of URL access configuration. More...

Typedefs

typedef std::map< std::string, AccessPolicyAccessPolicyCache
 A cache of AccessPolicy defined for URLs. More...
 

Enumerations

enum  AccessPolicy { BLOCK, GRANT }
 Possible access policies for URLs. More...
 

Functions

const char * accessPolicyString (AccessPolicy policy)
 
bool allowHost (const std::string &host)
 
bool allowXMLSocket (const std::string &host, short port)
 
bool allow (const URL &url, const URL &baseurl)
 Return true if access to given url is allowed, false otherwise. More...
 

Detailed Description

Manage a list of URL access configuration.

Typedef Documentation

§ AccessPolicyCache

A cache of AccessPolicy defined for URLs.

Enumeration Type Documentation

§ AccessPolicy

Possible access policies for URLs.

Enumerator
BLOCK 

Forbid access.

GRANT 

Allow access.

Function Documentation

§ accessPolicyString()

const char* gnash::URLAccessManager::accessPolicyString ( AccessPolicy  policy)

References BLOCK, and GRANT.

§ allow()

bool gnash::URLAccessManager::allow ( const URL url,
const URL baseurl 
)

Return true if access to given url is allowed, false otherwise.

Will use rc file for whitelist/blacklist and localSandbox.

Parameters
urlThe url to check
baseurlThe originating url, only used for local urls and only for protocol checking (ie: a non-local originating url will not be allowed to load a local url)

References _, gnash::URL::hostname(), gnash::log_error(), gnash::log_security(), gnash::URL::path(), and gnash::URL::protocol().

Referenced by gnash::Gui::advance_movie(), gnash::StreamProvider::allow(), and gnash::StreamProvider::namingPolicy().

§ allowHost()

bool gnash::URLAccessManager::allowHost ( const std::string &  host)

Referenced by allowXMLSocket().

§ allowXMLSocket()

DSOEXPORT bool gnash::URLAccessManager::allowXMLSocket ( const std::string &  host,
short  port 
)

References _, allowHost(), and gnash::log_security().