You.i Engine
YiNetworkConfiguration.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_NETWORK_CONFIGURATION_H_
3 #define _YI_NETWORK_CONFIGURATION_H_
4 
6 #include "utility/YiString.h"
7 
23 {
24 public:
25 
27  virtual ~CYINetworkConfiguration();
28 
32  void SetResponseCacheSize(uint32_t uBytes);
33 
37  void SetPersistentCacheSize(uint32_t uBytes);
38 
47  void SetHeuristicCacheExpirationEnabled(bool bEnable);
48 
52  uint32_t GetResponseCacheSize() const;
53 
57  uint32_t GetPersistentCacheSize() const;
58 
65 
71 
72  /*
73  \details Sets whether automatic cookie handling is enabled. Automatic cookie handling is not enabled by default.
74 
75  \note Automatic cookie handling enables a cookie store where cookies are saved between requests. Session cookies are kept in the cookie store until the app is restarted and a new "session" starts. Requests must be set to use cookies to have cookies automatically added to the header by calling CYIHTTPRequest::SetUseCookies.
76 
77  \sa CYIHTTPRequest::SetUseCookies
78  */
79  void SetEnableCookieHandling(bool bEnableCookieHandling);
80 
84  bool IsCookieHandlingEnabled() const;
85 
86 private:
87  uint32_t m_nResponseCacheSize;
88  uint32_t m_nPersistentCacheSize;
89  mutable CYIString m_persistentCachePath;
90  bool m_bUseHeuristicExpiration;
91  bool m_bCookieHandlingEnabled;
92 };
93 
96 #endif // _YI_NETWORK_CONFIGURATION_H_
void SetResponseCacheSize(uint32_t uBytes)
CYIString GetPersistentCachePath() const
bool IsHeuristicCacheExpirationEnabled() const
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
CYINetworkConfiguration is a data structure that describes the properties of the You.i Engine network components.
Definition: YiNetworkConfiguration.h:22
uint32_t GetPersistentCacheSize() const
bool IsCookieHandlingEnabled() const
void SetHeuristicCacheExpirationEnabled(bool bEnable)
void SetEnableCookieHandling(bool bEnableCookieHandling)
void SetPersistentCacheSize(uint32_t uBytes)
uint32_t GetResponseCacheSize() const
virtual ~CYINetworkConfiguration()