diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-24 16:55:09 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-24 16:55:09 +0000 |
commit | 5b74bda58f47e7894a83643b86d24f0c78e60285 (patch) | |
tree | 7e09452c287b46442dae30a7186539bc53793dca /HTTPServer/MimeHandling.h | |
parent | 03a7b123e64c552639c89cb80105003b076eff55 (diff) |
added HTTPServer
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@206 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'HTTPServer/MimeHandling.h')
-rw-r--r-- | HTTPServer/MimeHandling.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/HTTPServer/MimeHandling.h b/HTTPServer/MimeHandling.h new file mode 100644 index 0000000..f40fdf9 --- /dev/null +++ b/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 |