]> git.sur5r.net Git - freertos/blob - Demo/Common/ethernet/FreeTCPIP/apps/httpd/httpd-cgi.h
Another two header files added back having been previously removed.
[freertos] / Demo / Common / ethernet / FreeTCPIP / apps / httpd / httpd-cgi.h
1 /**\r
2  * \addtogroup httpd\r
3  * @{\r
4  */\r
5 \r
6 /**\r
7  * \file\r
8  *         Web server script interface header file\r
9  * \author\r
10  *         Adam Dunkels <adam@sics.se>\r
11  *\r
12  */\r
13 \r
14 /*\r
15  * Copyright (c) 2001, Adam Dunkels.\r
16  * All rights reserved.\r
17  *\r
18  * Redistribution and use in source and binary forms, with or without\r
19  * modification, are permitted provided that the following conditions\r
20  * are met:\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
29  *\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
41  *\r
42  * This file is part of the uIP TCP/IP stack.\r
43  *\r
44  * $Id: httpd-cgi.h,v 1.2 2006/06/11 21:46:38 adam Exp $\r
45  *\r
46  */\r
47 #ifndef __HTTPD_CGI_H__\r
48 #define __HTTPD_CGI_H__\r
49 \r
50 #include "net/psock.h"\r
51 #include "httpd.h"\r
52 \r
53 typedef                         PT_THREAD( (*httpd_cgifunction) ( struct httpd_state *, char * ) );\r
54 \r
55 httpd_cgifunction       httpd_cgi( char *name );\r
56 \r
57 struct httpd_cgi_call\r
58 {\r
59         const char                              *name;\r
60         const httpd_cgifunction function;\r
61 };\r
62 \r
63 /**\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
68  *\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
72  *\r
73  * \hideinitializer\r
74  */\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
78         {                                                                                                                                 \\r
79                 str, function                                                                                             \\r
80         }\r
81 \r
82 void httpd_cgi_init( void );\r
83 #endif /* __HTTPD_CGI_H__ */\r
84 \r
85 /** @} */\r