-
Notifications
You must be signed in to change notification settings - Fork 6
/
freedb.h
42 lines (34 loc) · 1.29 KB
/
freedb.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
/***************************************************************************
freedb.h - free spaces database support include
-------------------
begin : Sun Apr 29 2001
copyright : (C) 2001 by Alexander Bilichenko
email : [email protected]
***************************************************************************/
#ifndef FREEDBFILE_H_INCLUDED
#define FREEDBFILE_H_INCLUDED
#include "basetypes.h"
#define FREEDBFILE_ERROR_ALLOK 0
#define FREEDBFILE_ERROR_NOT_INITIALIZED 1
#define FREEDBFILE_ERROR_IO_ERROR 2
#define FREEDBFILE_ERROR_INVALID_FILE 3
#define FREEDBFILE_NO_FREE_SPACE 0xFFFFFFFF
#define FREEDBFILE_READBUF_COUNT 20
/* free spaces index table entry */
struct SFreeDBEntry {
DWORD size;
DWORD index;
};
class CFreeDBFile {
protected:
char *fname;
int init;
DWORD wasted_block;
public:
CFreeDBFile(const char *ifname, DWORD wasted_block);
~CFreeDBFile();
DWORD errnum;
DWORD MarkFreeSpace(DWORD bIndex, DWORD bsize);
DWORD AllocFreeSpace(DWORD size);
};
#endif