OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [ethernet/] [FreeTCPIP/] [apps/] [httpd/] [httpd-cgi.h] - Blame information for rev 606

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.