2005-07-31 06:07:48 +00:00
|
|
|
#ifndef _INCLUDE_IVAULT_H
|
|
|
|
#define _INCLUDE_IVAULT_H
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
class IVault
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~IVault() { }
|
|
|
|
public:
|
|
|
|
virtual bool GetValue(const char *key, time_t &stamp, char buffer[], size_t len) =0;
|
|
|
|
virtual void SetValue(const char *key, const char *val) =0;
|
|
|
|
virtual void SetValue(const char *key, const char *val, time_t stamp) =0;
|
|
|
|
virtual size_t Prune(time_t start, time_t end) =0;
|
|
|
|
virtual void Clear() =0;
|
|
|
|
virtual void Remove(const char *key) =0;
|
|
|
|
virtual size_t Items() =0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class IVaultMngr
|
|
|
|
{
|
|
|
|
public:
|
2006-08-18 22:46:07 +00:00
|
|
|
/**
|
|
|
|
* Note: Will return NULL if the vault failed to create.
|
|
|
|
*/
|
2005-07-31 06:07:48 +00:00
|
|
|
virtual IVault *OpenVault(const char *name) =0;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef IVaultMngr *(*GETVAULTMNGR_FUNC)();
|
|
|
|
|
|
|
|
#endif //_INCLUDE_IVAULT_H
|