diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-04-04 17:21:40 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-04-04 17:21:40 +0200 |
commit | 37497bd5fa0f070e12c1c28d849aef1af8f369b5 (patch) | |
tree | 28f16eee27219c6125326acfa5f4ac16514797ce /ftparchive/cachedb.h | |
parent | 53ba4e2c2dd29758be0a911489ca5c23e5107513 (diff) |
refactor _InitQuery()
Diffstat (limited to 'ftparchive/cachedb.h')
-rw-r--r-- | ftparchive/cachedb.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h index 4e33c8635..54a274944 100644 --- a/ftparchive/cachedb.h +++ b/ftparchive/cachedb.h @@ -41,7 +41,7 @@ class CacheDB std::string DBFile; // Generate a key for the DB of a given type - inline void InitQuery(const char *Type) + void _InitQuery(const char *Type) { memset(&Key,0,sizeof(Key)); memset(&Data,0,sizeof(Data)); @@ -49,6 +49,19 @@ class CacheDB Key.size = snprintf(TmpKey,sizeof(TmpKey),"%s:%s",FileName.c_str(), Type); } + void InitQueryStats() { + _InitQuery("st"); + } + void InitQuerySource() { + _InitQuery("cs"); + } + void InitQueryControl() { + _InitQuery("cl"); + } + void InitQueryContent() { + _InitQuery("cn"); + } + inline bool Get() { return Dbp->get(Dbp,0,&Key,&Data,0) == 0; |