]> Shamusworld >> Repos - virtualjaguar/blob - src/gui/filethread.h
Added image filenames to ROM database, file flags. Will split these out soon.
[virtualjaguar] / src / gui / filethread.h
1 //
2 // filethread.h: File discovery thread class definition
3 //
4
5 #ifndef __FILETHREAD_H__
6 #define __FILETHREAD_H__
7
8 #include <QtCore>
9 #include "types.h"
10
11 // Forward declarations
12 //class QListWidget;
13
14 class FileThread: public QThread
15 {
16         Q_OBJECT
17
18         public:
19                 FileThread(QObject * parent = 0);
20                 ~FileThread();
21 //              void Go(QListWidget * lw);
22                 void Go(void);
23
24         signals:
25                 void FoundAFile(unsigned long index);
26
27         protected:
28                 void run(void);
29                 uint32 FindCRCIndexInFileList(uint32);
30
31         private:
32 //              QListWidget * listWidget;
33                 QMutex mutex;
34                 QWaitCondition condition;
35                 bool abort;
36 };
37
38 enum FileFlags { FF_ROM=1, FF_ALPINE=2, FF_BIOS=4, FF_REQ_DSP=8, FF_REQ_BIOS=16, FF_NON_WORKING=32 };
39
40 struct RomIdentifier
41 {
42         const uint32 crc32;
43         const char name[128];
44         const char file[128];
45         const uint32 flags;
46 };
47
48 extern RomIdentifier romList[];
49
50 #endif  // __FILETHREAD_H__