+/*
+ * $Id$
+ *
+ */
+
+/*
+ * Here's a bunch of stupid magic to make the MIME parser portable between
+ * Citadel and WebCit.
+ */
+#ifndef SIZ
+#define SIZ 4096
+#endif
+
+#ifndef mallok
+#define mallok(x) malloc(x)
+#endif
+
+#ifndef phree
+#define phree(x) free(x)
+#endif
+
+#ifndef reallok
+#define reallok(x,y) realloc(x,y)
+#endif
+
+#ifndef strdoop
+#define strdoop(x) strdup(x)
+#endif
+
+/*
+ * Declarations for functions in the parser
+ */
+
void extract_key(char *target, char *source, char *key);
-void do_something_with_it(char *content,
- int length,
- char *content_type,
- char *content_disposition,
+void mime_parser(char *content_start, char *content_end,
void (*CallBack)
(char *cbname,
char *cbfilename,
- char *cbencoding,
+ char *cbpartnum,
+ char *cbdisp,
void *cbcontent,
- size_t cblength)
- );
-
-void handle_part(char *content,
- int part_length,
- char *supplied_content_type,
- void (*CallBack)
+ char *cbtype,
+ size_t cblength,
+ char *cbencoding,
+ void *cbuserdata),
+ void (*PreMultiPartCallBack)
(char *cbname,
char *cbfilename,
- char *cbencoding,
+ char *cbpartnum,
+ char *cbdisp,
void *cbcontent,
- size_t cblength)
- );
-
-void mime_parser(char *content,
- int ContentLength,
- char *ContentType,
- void (*CallBack)
+ char *cbtype,
+ size_t cblength,
+ char *cbencoding,
+ void *cbuserdata),
+ void (*PostMultiPartCallBack)
(char *cbname,
char *cbfilename,
- char *cbencoding,
+ char *cbpartnum,
+ char *cbdisp,
void *cbcontent,
- size_t cblength)
+ char *cbtype,
+ size_t cblength,
+ char *cbencoding,
+ void *cbuserdata),
+ void *userdata,
+ int dont_decode
);