Debian Codegraph @

components/verifier/accuraterip/drive.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_DRIVE
14 #define H_DRIVE
15
16 #include <boca.h>
17
18 #include "database.h"
19
20 namespace BoCA
21 {
22 enum ConfigurationLevel
23 {
24 ConfigurationLevelUnconfigured,
25 ConfigurationLevelAutomatic,
26 ConfigurationLevelVerified,
27 ConfigurationLevelManual,
28 ConfigurationLevelManualOverride
29 };
30
31 class Drive
32 {
33 constants:
34 static const Int bytesPerSector = 2352;
35 static const Int samplesPerSector = 588;
36 private:
37 Int FindCurrentDriveNumber() const;
38
39 DatabaseEntry GetDatabaseEntry() const;
40 Bool ToggleAutoRead(Bool) const;
41 public:
42 const Config *config;
43
44 Device device;
45
46 Drive(const Config *, Int);
47 ~Drive();
48
49 ConfigurationLevel GetConfigurationLevel(Bool = False) const;
50 Int GetDetectedOffset() const;
51
52 ConfigurationLevel ConfigureOffset(Bool = False, Bool = True) const;
53 };
54 };
55
56 #endif