Debian Codegraph @

components/verifier/accuraterip/database.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2021 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
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