--- libaitwww/inc/aitwww.h 2012/03/09 09:38:55 1.1.1.1.2.1 +++ libaitwww/inc/aitwww.h 2012/03/09 12:33:41 1.1.1.1.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitwww.h,v 1.1.1.1.2.1 2012/03/09 09:38:55 misho Exp $ +* $Id: aitwww.h,v 1.1.1.1.2.2 2012/03/09 12:33:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -75,7 +75,9 @@ struct tagMIME { SLIST_ENTRY(tagMIME) mime_node; }; +typedef int (*list_cb_t)(struct tagCGI *, void *); + // www_GetErrno() Get error code of last operation inline int www_GetErrno(); // www_GetError() Get error text of last operation @@ -136,6 +138,15 @@ int www_addValue(cgi_t * __restrict cgi, const char *n * return: -1 error, 0 not found or 1 deleted ok */ int www_delPair(cgi_t * __restrict cgi, const char *name); +/* + * www_listPairs() - Walk over CGI session variables + * + * @cgi = Cgi session + * @func = If !=NULL call function for each element + * @arg = Optional argument pass through callback + * return: -1 error or >-1 number of elements + */ +inline int www_listPairs(cgi_t * __restrict cgi, list_cb_t func, void *arg); /* * www_header() - Output initial html header