summaryrefslogtreecommitdiffstats
path: root/libk9copy/k9dvdread.h
blob: 38bd6e064d63e9e6913c5669cbb83ce945040519 (plain)
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
//
// C++ Interface: k9dvdread
//
// Description: 
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9DVDREAD_H
#define K9DVDREAD_H

#include "k9common.h"
#include <tqlibrary.h>

/**
	@author Jean-Michel PETIT <k9copy@free.fr>
*/

class k9DVDRead;
class k9Ifo2;

class k9DVDFile {
friend class k9DVDRead;
private:
    dvd_file_t *m_file;
    k9DVDRead *m_dvd;
    TQLibrary *m_library;
    void openIfo(uint _vts);
    void openMenu(uint _vts);
    void openTitle(uint _vts);

public:
    k9DVDFile(k9DVDRead *_dvd);
    ~k9DVDFile();
    void close();
    int readBytes(uchar *_buffer,uint32_t _size);
    int readBlocks(uint32_t _sector,uint32_t _size,uchar*_buffer);
};


class k9DVDRead{
friend class k9DVDTitle;
private:
  dvd_reader_t *m_dvd;
  TQPtrList <k9DVDFile> files;
  TQPtrList <k9Ifo2> ifos;
public:
    k9DVDRead();
    ~k9DVDRead();
    void openDevice(const TQString & _device);
    k9DVDFile *openIfo(uint _vts);
    k9DVDFile *openMenu(uint _vts);
    k9DVDFile *openTitle(uint _vts);
    k9Ifo2 *getIfo(int _num);
    TQString getDiscId();
    void close();
    bool opened();

	dvd_reader_t* getDvd() const {
	    return m_dvd;
	}
	

};


#endif