libflow - Basic CGI C library.

Features include:
* work with GET/POST requests
* work with request paths
* work with incoming files
* POST: support of form-data and x-www-form-urlencoded

libflow has simple API described above.

interface

	#include < libflow.h >
	
	int
	flow_init(flow_t * flow);
	

The flow_init function initializes flow_t private structure and processes GET/POST request variables. On Success MAIL_EOK will be returned, otherwise error.

	void
	flow_free(flow_t * flow);
	

flow_free function frees memory used by flow_t structure.

	flow_var_t*
	flow_var(flow_t * flow, char * name);
	

flow_var function returns pointer to variable description structure flow_var_t matching variable name. If no variable is matched NULL will be returned. Following macroses can be used to obtain variable specific information: FLOW_MIME(var), FLOW_ISFILE(var), FLOW_FILENAME(var), FLOW_VALUE(var), FLOW_VALUE_SIZE(var).

	int
	flow_path(char ** argv, int argc);
	

flow_path function proceeds parsing of PATH_INFO environment variable according to supplied argv vector and it's size argc. Returns number of path elements.

Download