File: diskid.h

package info (click to toggle)
mkcue 1-6
  • links: PTS
  • area: main
  • in suites: buster
  • size: 536 kB
  • sloc: sh: 2,618; cpp: 1,747; makefile: 79
file content (94 lines) | stat: -rw-r--r-- 2,349 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* --------------------------------------------------------------------------

   MusicBrainz -- The Internet music metadatabase

   Copyright (C) 2000 Robert Kaye
   Copyright (C) 1999 Marc E E van Woerkom
   
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.
   
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.
   
   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

     $Id: diskid.h,v 1.3 2000/09/22 14:15:01 robert Exp $

----------------------------------------------------------------------------*/

#if !defined(_DISKID_H_)
#define _DISKID_H_

#include <string>

using namespace std;

//
//  platform specific stuff
//

#if defined(_WIN32) && !defined(__CYGWIN__)
#include "../osdep/mb_win32.h"  // MSVC++ (not Cygwin!)
#else
#include "mb.h"        // platforms using configure script
#endif
#include "types.h"
#include "errors.h"


//
//  constants
//

#if !defined(CD_BLOCK_OFFSET)
#define CD_BLOCK_OFFSET CD_MSF_OFFSET
#endif



//
//  cdinfo struct 
//

typedef	unsigned char byte;
typedef unsigned long dword;

typedef struct {
    byte FirstTrack;         // The first track on CD : normally 1
    byte LastTrack;          // The last track on CD: max number 99
    
    dword FrameOffset[100];  // Track 2 is TrackFrameOffset[2] etc.
                             // Leadout Track will be TrackFrameOffset[0]

} MUSICBRAINZ_CDINFO, *PMUSICBRAINZ_CDINFO; 


extern MUSICBRAINZ_DEVICE DEFAULT_DEVICE;


//
// DiskId class 
//

class DiskId
{
    public:

//                 DiskId(void);

        void  ReportError(char *err);

        // This function is OS dependent, and will be implemented by
        // one of the modules in the osdep dir.
        bool ReadTOC(MUSICBRAINZ_DEVICE device, 
                     MUSICBRAINZ_CDINFO& cdinfo);
};

#endif