diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-01-20 19:55:35 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-01-20 19:55:35 +0000 |
commit | 94e30af2ef983a919ccd49872a333819db228c28 (patch) | |
tree | 0a13ca6e1524f9e0e81c6dc8b846cb3303c385bf /plugins/HTTPServer/src/MimeHandling.h | |
parent | ff295a8732736a06b1c60dc1e19c1766b6a1e9d8 (diff) |
HTTPServer adopted
git-svn-id: http://svn.miranda-ng.org/main/trunk@3200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/MimeHandling.h')
-rw-r--r-- | plugins/HTTPServer/src/MimeHandling.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/plugins/HTTPServer/src/MimeHandling.h b/plugins/HTTPServer/src/MimeHandling.h new file mode 100644 index 0000000000..f40fdf94c8 --- /dev/null +++ b/plugins/HTTPServer/src/MimeHandling.h @@ -0,0 +1,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 |