8 * Web server script interface header file
\r
10 * Adam Dunkels <adam@sics.se>
\r
17 * Copyright (c) 2001, Adam Dunkels.
\r
18 * All rights reserved.
\r
20 * Redistribution and use in source and binary forms, with or without
\r
21 * modification, are permitted provided that the following conditions
\r
23 * 1. Redistributions of source code must retain the above copyright
\r
24 * notice, this list of conditions and the following disclaimer.
\r
25 * 2. Redistributions in binary form must reproduce the above copyright
\r
26 * notice, this list of conditions and the following disclaimer in the
\r
27 * documentation and/or other materials provided with the distribution.
\r
28 * 3. The name of the author may not be used to endorse or promote
\r
29 * products derived from this software without specific prior
\r
30 * written permission.
\r
32 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
\r
33 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
\r
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
\r
35 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
\r
36 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
\r
38 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\r
39 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
\r
40 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
\r
41 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
\r
42 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
44 * This file is part of the uIP TCP/IP stack.
\r
46 * $Id: httpd-cgi.h,v 1.2 2006/06/11 21:46:38 adam Exp $
\r
50 #ifndef __HTTPD_CGI_H__
\r
51 #define __HTTPD_CGI_H__
\r
56 typedef PT_THREAD((* httpd_cgifunction)(struct httpd_state *, char *));
\r
58 httpd_cgifunction httpd_cgi(char *name);
\r
60 struct httpd_cgi_call {
\r
62 const httpd_cgifunction function;
\r
66 * \brief HTTPD CGI function declaration
\r
67 * \param name The C variable name of the function
\r
68 * \param str The string name of the function, used in the script file
\r
69 * \param function A pointer to the function that implements it
\r
71 * This macro is used for declaring a HTTPD CGI
\r
72 * function. This function is then added to the list of
\r
73 * HTTPD CGI functions with the httpd_cgi_add() function.
\r
77 #define HTTPD_CGI_CALL(name, str, function) \
\r
78 static PT_THREAD(function(struct httpd_state *, char *)); \
\r
79 static const struct httpd_cgi_call name = {str, function}
\r
81 void httpd_cgi_init(void);
\r
82 #endif /* __HTTPD_CGI_H__ */
\r