You.i Engine
CYINetworkConfiguration Class Reference

Detailed Description

CYINetworkConfiguration is a data structure that describes the properties of the You.i Engine network components.

Default values: Response cache size: 7 * 1024 * 1024 bytes Persistent cache size: 50 * 1024 * 1024 bytes

#include <network/YiNetworkConfiguration.h>

Inheritance diagram for CYINetworkConfiguration:

Public Member Functions

 CYINetworkConfiguration ()
 
virtual ~CYINetworkConfiguration ()
 
void SetResponseCacheSize (uint32_t uBytes)
 
void SetPersistentCacheSize (uint32_t uBytes)
 
void SetHeuristicCacheExpirationEnabled (bool bEnable)
 
uint32_t GetResponseCacheSize () const
 
uint32_t GetPersistentCacheSize () const
 
CYIString GetPersistentCachePath () const
 
bool IsHeuristicCacheExpirationEnabled () const
 
void SetEnableCookieHandling (bool bEnableCookieHandling)
 
bool IsCookieHandlingEnabled () const
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const
 

Constructor & Destructor Documentation

CYINetworkConfiguration::CYINetworkConfiguration ( )
virtual CYINetworkConfiguration::~CYINetworkConfiguration ( )
virtual

Member Function Documentation

CYIString CYINetworkConfiguration::GetPersistentCachePath ( ) const

Returns the path used by the persistent cache. This is a folder named 'NetworkPersistentCache' under the application's cache path.

See also
CYIApp::GetCachePath()
uint32_t CYINetworkConfiguration::GetPersistentCacheSize ( ) const

The size in bytes of the file persistent cache. Default is 50 * 1024 * 1024

uint32_t CYINetworkConfiguration::GetResponseCacheSize ( ) const

The size in bytes of the HTTP response cache. Default is 7 * 1024 * 1024

bool CYINetworkConfiguration::IsCookieHandlingEnabled ( ) const

Returns true if cookie handling is enabled. Cookies are saved in the cookie store and included in subsequent requests automatically if cookie handling is enabled.

bool CYINetworkConfiguration::IsHeuristicCacheExpirationEnabled ( ) const

Returns true if heuristic expiration is enabled. Default is enabled.

See also
EnableHeuristicCacheExpiration
void CYINetworkConfiguration::SetEnableCookieHandling ( bool  bEnableCookieHandling)
void CYINetworkConfiguration::SetHeuristicCacheExpirationEnabled ( bool  bEnable)

Enables heuristic expiration for caches. This allows caching of responses that don't contain the 'Cache-Control' or 'Expires' header fields. In the case where these fields don't exist, we use the 'Last-Modified' and 'Date' header fields to determine heuristic freshness. If either of these headers are missing, the reponse will not be cached.

This is enabled by default.

void CYINetworkConfiguration::SetPersistentCacheSize ( uint32_t  uBytes)

The size in uBytes of the file persistent cache. Using the HTTP request URLs as keys, the cache will store up to nBytes of downloaded file information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 50 * 1024 * 1024

void CYINetworkConfiguration::SetResponseCacheSize ( uint32_t  uBytes)

The size in uBytes of the HTTP response cache. Using the HTTP request URLs as keys, the cache will store up to nBytes of HTTP response information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 7 * 1024 * 1024


The documentation for this class was generated from the following file: