blob: 80efcc1243c879913e6df287d5bd8c6d192210ec (
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
|
#define LINE_MAX_SIZE 512
#ifdef __cplusplus
extern "C" {
#endif
#define szMimeTypeConfigFile _T("HTTPMimeTypes")
/* MIME DB Data structure
---------- ----------
| mimeType | | mimeType |
|----------| |----------|
----| next -----------------| next |
|----------| |----------|
| extList --- | extList ---
---------- | ---------- |
--|--- --|---
| ext | | ext |
|------| |------|
| next | | next |
--|--- ------
--|---
| ext |
|------|
| next |
------
*/
typedef struct _ExtensionListCell {
TCHAR *ext;
struct _ExtensionListCell *next;
} ExtensionListCell;
typedef struct _ContentType {
TCHAR *mimeType;
ExtensionListCell *extList;
struct _ContentType *next;
} ContentType;
typedef ContentType *ContentTypeDB;
typedef ExtensionListCell *ExtensionList;
extern int bInitMimeHandling();
extern const TCHAR *pszGetMimeType(const TCHAR *pszFileName);
#ifdef __cplusplus
}
#endif
|