-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCatalog.h
executable file
·119 lines (110 loc) · 2.21 KB
/
Catalog.h
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Catalog.h: interface for the CCatalog class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CATALOG_H__7CBB6019_B7F7_11D9_B539_FF062122A253__INCLUDED_)
#define AFX_CATALOG_H__7CBB6019_B7F7_11D9_B539_FF062122A253__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const int _MAX_CHARS=127;
struct Catalog;
enum {ARCHIVE=1, COMPRESSED=2, DIRECTORY=4, ENCRYPTED=8, HIDDEN=16, READONLY=32, SYSTEM=64};
struct EncodedCatalog
{
FILETIME ftCreationTime;
//DWORD dwDetails[2];
//DWORD nChars:15,
DWORD nFileName:8,
nDesc:7,
myIndex:20,//15,
flag:2;
DWORD nFileSizeLow:10,
parent:20,//15,
dwFileAttributes:7;
public:
void Write(fstream &file);
Catalog Read(fstream &file);
EncodedCatalog();
~EncodedCatalog();
};
struct ID3
{
char TID[3];
char title[30];
char artist[30];
char album[30];
char year[4];
char comment[30];
BYTE genre;
public:
ID3();
~ID3();
};
struct Catalog
{
FILETIME ftCreationTime;//8
DWORD myIndex;
DWORD parent;
//DWORD nextIndex;
DWORD nFileSizeLow;
BYTE nFileName;
BYTE nDesc;
//WORD nChars;
BYTE flag;
BYTE dwFileAttributes;
//UCHAR level;
public:
Catalog(EncodedCatalog enc);
operator EncodedCatalog();
Catalog();
~Catalog();
};
struct Files
{
char cFileName[_MAX_FNAME];//256
char desc[_MAX_CHARS];
void Read(fstream &file, BYTE nFileName, BYTE nDesc);
void Write(fstream &file, BYTE nFileName, BYTE nDesc);
public:
Files();
~Files();
};
struct FileData
{
FILETIME ftCreationTime;//8
DWORD nFileSizeLow;//4
WORD dwFileAttributes;//2
BYTE flag;
char cFileName[_MAX_FNAME];
char desc[_MAX_CHARS];
public:
FileData(Catalog c, Files f);
FileData();
~FileData();
};
class CFilesInfo
{
public:
FileData fd;
CFilesInfo(FileData f);
CFilesInfo();
~CFilesInfo();
};
struct CSizeDesc
{
double fFileSize;
CString desc;
};
class CCatalog
{
public:
CCatalog *sub;//4
CCatalog *next;//4
Catalog cat;//354
Files files;
static int Verified(fstream &file);
CCatalog();
void FreeTree(CCatalog *cat);
~CCatalog();
};
#endif // !defined(AFX_CATALOG_H__7CBB6019_B7F7_11D9_B539_FF062122A253__INCLUDED_)