aboutsummaryrefslogtreecommitdiff
path: root/include/magi/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/magi/file.h')
-rw-r--r--include/magi/file.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/include/magi/file.h b/include/magi/file.h
index 1b1fb35..d4c5e98 100644
--- a/include/magi/file.h
+++ b/include/magi/file.h
@@ -1,47 +1,43 @@
#ifndef MAGI_INCLUDED_FILE
#define MAGI_INCLUDED_FILE
-/** @file file.h
- * @brief Form field of file with its parameters.
+/* Form field of file with its parameters.
*/
#include "param.h"
-/** Form field of file with its parameters. */
typedef struct magi_file {
- char *field; /**< Name of form field. */
- char *filename; /**< File name on user's computer. */
- magi_params *params; /**< Multipart params (e.g. type). */
+ char *field; /* Name of form field. */
+ char *filename; /* File name on user's computer. */
+ magi_params *params; /* Multipart params (e.g. type). */
} magi_file;
-/** Form files collection.
- * Implemented as a linked list. */
+/* Form files collection, implemented as a linked list. */
typedef struct magi_files {
- struct magi_files *next; /**< Pointer to next files. */
- magi_file item; /**< File on top. */
+ struct magi_files *next; /* Pointer to next files. */
+ magi_file item; /* File on top. */
} magi_files;
-/** Add @p newitem to @p files.
- * @param[in,out] files to add into.
- * @param[in] newitem to add onto top of @p files. */
+/* Free memory used by files. */
+void magi_files_free(magi_files *files);
+
+/* Add newitem onto top of files. */
void magi_files_add(magi_files **files, magi_file *newitem);
-/** Get file with @p name from @p files.
- * @param[in] files to search in.
- * @param[in] name of needed file.
- * @return first from top of @p files file with @p name,
- * null only if no such file. */
+/* Get first from top of files file with name, null if no such file. */
magi_file *magi_files_get(magi_files *files, const char *name);
-/** Free memory used by @p files.
- * @param[in,out] files to be destructed. */
-void magi_files_free(magi_files *files);
-
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Callback to load files while analysing request.
+ * addon_len is not null if something to add is in addon
+ * and null if file_to_add_into is ended.
+ * Files are passed sequentialy, one by one. */
typedef void (*magi_file_callback_act)(void *userdata,
magi_file *file_to_add_into,
char *addon,
int addon_len);
+
typedef struct magi_file_callback {
magi_file_callback_act act;
void *userdata;