| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef H_DATABASE |
| 14 |
#define H_DATABASE |
| 15 |
|
| 16 |
#include <boca.h> |
| 17 |
|
| 18 |
namespace BoCA |
| 19 |
{ |
| 20 |
class DatabaseEntry |
| 21 |
{ |
| 22 |
private: |
| 23 |
Int numTracks; |
| 24 |
|
| 25 |
Array<Int> trackConfidence; |
| 26 |
Array<UnsignedInt> trackChecksums; |
| 27 |
|
| 28 |
Array<UnsignedInt> offsetDetectionChecksums; |
| 29 |
public: |
| 30 |
DatabaseEntry(); |
| 31 |
~DatabaseEntry(); |
| 32 |
|
| 33 |
Bool Parse(const String &); |
| 34 |
|
| 35 |
Int Verify(Int, UnsignedInt) const; |
| 36 |
Bool VerifyOffsetDetection(Int, UnsignedInt) const; |
| 37 |
|
| 38 |
Bool IsValid() const; |
| 39 |
}; |
| 40 |
|
| 41 |
class Database |
| 42 |
{ |
| 43 |
private: |
| 44 |
static Array<DatabaseEntry> sessionCache; |
| 45 |
public: |
| 46 |
static Void InitializeSessionCache(); |
| 47 |
|
| 48 |
static DatabaseEntry Query(const Config *, const String &); |
| 49 |
}; |
| 50 |
}; |
| 51 |
|
| 52 |
#endif |