/*
 * Prototypes for utitlity functions MSTs can use to process form
 * data.
 */
int mst_parse_form_content ( void *context,
	char *content_type,		/* upcased MIME content type */
	char *fdata, int fdata_len,	/* Content to be parsed */
	int define_symbol ( void *, char *, int, char *, int ) );

struct mst_form_symbol {
    struct mst_form_symbol *next;
    char *value;
    int vallen;
    char name[1];			/* variable-sized allocation */
};
struct mst_form_values {
    struct mst_form_symbol *symbol;	/* list head for parsed name/value pairs */
    int content_length;
    char fdata[1];			/* variable length */
};

int mst_load_form_data ( mst_link_t cnx, 
	int content_limit,		/* max content_length allowed */
	struct mstshr_envbuf *env,	/* CGI symbols array */
	struct mst_form_values **form_info );

void mst_free_form_data ( struct mst_form_values *form_info );

struct mst_form_symbol *mst_get_form_symbol ( const char *name, 
	struct mst_form_values *form_info );
