aboutsummaryrefslogtreecommitdiff
path: root/src/multipart.h
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-09-13 18:50:34 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-09-13 18:50:34 +0300
commitad6188f911af896c9c77e9215bea3c5c2a4e6cc3 (patch)
tree158b4015ff302f72fe2bb8a0ee3d5441ffb66719 /src/multipart.h
downloadmagi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.tar
magi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.tar.xz
magi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.zip
Project name and license are added. Minor changes.
Diffstat (limited to 'src/multipart.h')
-rw-r--r--src/multipart.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/multipart.h b/src/multipart.h
new file mode 100644
index 0000000..3e77391
--- /dev/null
+++ b/src/multipart.h
@@ -0,0 +1,23 @@
+#ifndef MAGI_INCLUDED_MULTIPART_H
+#define MAGI_INCLUDED_MULTIPART_H
+
+#include "field.h"
+
+
+enum {
+ magi_parse_multipart_callback_size = 64
+};
+
+
+int magi_parse_multipart(
+ struct magi_field_list **list,
+ int (*get_next)(void *),
+ void *get_next_arg,
+ char *boundary,
+ /* End if size < magi_parse_multipart_callback_size. */
+ /* Null callback means filling list. */
+ void (*callback)(struct magi_field *field, char *buffer, int size)
+);
+
+
+#endif