summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/HTTPServer/MimeHandling.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/!NotAdopted/HTTPServer/MimeHandling.h')
-rw-r--r--plugins/!NotAdopted/HTTPServer/MimeHandling.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/HTTPServer/MimeHandling.h b/plugins/!NotAdopted/HTTPServer/MimeHandling.h
new file mode 100644
index 0000000000..f40fdf94c8
--- /dev/null
+++ b/plugins/!NotAdopted/HTTPServer/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