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