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