EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
APICacheManager Class Reference

#include "APICacheManager.h"

Public Member Functions

 APICacheManager ()
 
bool CacheRetrieve (const std::string *apiDescriptor, std::string *xmlDoc)
 ? More...
 
bool CacheDeposit (const std::string *apiDescriptor, const std::string *xmlDoc, uint64 win32timeExpiration)
 ? More...
 

Detailed Description

Definition at line 31 of file APICacheManager.h.

Constructor & Destructor Documentation

APICacheManager::APICacheManager ( )

Definition at line 30 of file APICacheManager.cpp.

31 {
32 }

Member Function Documentation

bool APICacheManager::CacheDeposit ( const std::string *  apiDescriptor,
const std::string *  xmlDoc,
uint64  win32timeExpiration 
)

?

?

Parameters
[in]?
[in]?
Return values
?

Definition at line 46 of file APICacheManager.cpp.

47 {
48  // TODO:
49  // 1) run apiDescriptor string through SHA1 hash, then create a file
50  // with the name of the hash with '.apiobj' extension
51  // 2) check to see if this filename already exists, if so, return FALSE
52  // 3) place the win32timeExpiration value at the first line of the file, this indicates when this cached object expires
53  // 4) place the xmlDoc string in the rest of the file, save and close it
54  // 5) return TRUE
55  return false;
56 }
bool APICacheManager::CacheRetrieve ( const std::string *  apiDescriptor,
std::string *  xmlDoc 
)

?

?

Parameters
[in]?
[in]?
Return values
?

Definition at line 34 of file APICacheManager.cpp.

35 {
36  // TODO:
37  // 1) run apiDescriptor string through SHA1 hash, then search for a file
38  // with the name of the hash with '.apiobj' extension
39  // 2) if no file found, then return FALSE
40  // 3) if file found, open it and grab first line, inspect this expriation time and compare to current time
41  // 4) if expiration has passed, return FALSE
42  // 5) if expiration has NOT passed, read rest of file contents and copy to xmlDoc string, then return TRUE
43  return false;
44 }

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