httpd-cgi.h

00001 /*
00002  * Copyright (c) 2001, Adam Dunkels.
00003  * All rights reserved. 
00004  *
00005  * Redistribution and use in source and binary forms, with or without 
00006  * modification, are permitted provided that the following conditions 
00007  * are met: 
00008  * 1. Redistributions of source code must retain the above copyright 
00009  *    notice, this list of conditions and the following disclaimer. 
00010  * 2. Redistributions in binary form must reproduce the above copyright 
00011  *    notice, this list of conditions and the following disclaimer in the 
00012  *    documentation and/or other materials provided with the distribution. 
00013  * 3. The name of the author may not be used to endorse or promote
00014  *    products derived from this software without specific prior
00015  *    written permission.  
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00018  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00023  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00025  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00026  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00027  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
00028  *
00029  * This file is part of the uIP TCP/IP stack.
00030  *
00031  * $Id: httpd-cgi.h,v 1.3 2010/02/12 16:42:59 dak664 Exp $
00032  *
00033  */
00034 
00035 #ifndef __HTTPD_CGI_H__
00036 #define __HTTPD_CGI_H__
00037 
00038 #include "contiki.h"
00039 #include "httpd.h"
00040 
00041 typedef PT_THREAD((* httpd_cgifunction)(struct httpd_state *, char *));
00042 
00043 httpd_cgifunction httpd_cgi(char *name);
00044 
00045 struct httpd_cgi_call {
00046   struct httpd_cgi_call *next;
00047   const char *name;
00048   httpd_cgifunction function;
00049 };
00050 
00051 void httpd_cgi_add(struct httpd_cgi_call *c);
00052 
00053 #define HTTPD_CGI_CALL(name, str, function) \
00054 static struct httpd_cgi_call name = {NULL, str, function}
00055 
00056 void httpd_cgi_init(void);
00057 void web_set_temp(char *s);
00058 void web_set_voltage(char *s);
00059 uint8_t httpd_cgi_sprint_ip6(uip_ip6addr_t addr, char * result);
00060 
00061 #endif /* __HTTPD_CGI_H__ */

Generated on Mon Apr 11 14:23:41 2011 for Contiki 2.5 by  doxygen 1.6.1