Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

cgisimple.h

Go to the documentation of this file.
00001 #ifndef CGISIMPLE_H_INCLUDED
00002 #define CGISIMPLE_H_INCLUDED
00003 #define CGISIMPLE_H_VERSION "$Id: cgisimple.h,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
00004 /* ******************************************************************
00005  * $Source: /cvsroot/ijbswa/current/src/cgisimple.h,v $
00006  * ******************************************************************
00007  *
00008  * Written by and Copyright (C) 2001 the SourceForge
00009  * Privoxy team. http://www.privoxy.org/
00010  * 
00011  * Based on the Internet Junkbuster originally written
00012  * by and Copyright (C) 1997 Anonymous Coders and
00013  * Junkbusters Corporation.  http://www.junkbusters.com
00014  * 
00015  * This program is free software; you can redistribute it
00016  * and/or modify it under the terms of the GNU General
00017  * Public License as published by the Free Software
00018  * Foundation; either version 2 of the License, or (at
00019  * your option) any later version.
00020  * 
00021  * This program is distributed in the hope that it will
00022  * be useful, but WITHOUT ANY WARRANTY; without even the
00023  * implied warranty of MERCHANTABILITY or FITNESS FOR A
00024  * PARTICULAR PURPOSE.  See the GNU General Public
00025  * License for more details.
00026  * 
00027  * The GNU General Public License should be included with
00028  * this file.  If not, you can view it at
00029  * http://www.gnu.org/copyleft/gpl.html
00030  * or write to the Free Software Foundation, Inc., 59
00031  * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00032  * 
00033  * *****************************************************************/
00034 /**
00035  * @file
00036  *
00037  * Declares functions to intercept request, generate
00038  * html or gif answers, and to compose HTTP resonses.
00039  * 
00040  * Functions declared include:
00041  * 
00042  * 
00043  *
00044  * $Log: cgisimple.h,v $
00045  * Revision 2.0  2002/06/04 14:34:21  jongfoster
00046  * Moving source files to src/
00047  * 
00048  * Revision 1.11  2002/04/05 15:50:53  oes
00049  * added send-stylesheet CGI
00050  * 
00051  * Revision 1.10  2002/03/26 22:29:54  swa
00052  * we have a new homepage!
00053  * 
00054  * Revision 1.9  2002/03/24 13:25:43  swa
00055  * name change related issues
00056  * 
00057  * Revision 1.8  2002/03/16 23:54:06  jongfoster
00058  * Adding graceful termination feature, to help look for memory leaks.
00059  * If you enable this (which, by design, has to be done by hand
00060  * editing config.h) and then go to http://i.j.b/die, then the program
00061  * will exit cleanly after the *next* request.  It should free all the
00062  * memory that was used.
00063  * 
00064  * Revision 1.7  2002/03/08 16:43:59  oes
00065  * Renamed cgi_transparent_png to cgi_transparent_image
00066  * 
00067  * Revision 1.6  2002/03/07 03:48:59  oes
00068  *  - Changed built-in images from GIF to PNG
00069  *    (with regard to Unisys patent issue)
00070  * 
00071  * Revision 1.5  2002/01/22 23:26:03  jongfoster
00072  * Adding cgi_transparent_gif() for http://i.j.b/t
00073  * 
00074  * Revision 1.4  2001/10/23 21:48:19  jongfoster
00075  * Cleaning up error handling in CGI functions - they now send back
00076  * a HTML error page and should never cause a FATAL error.  (Fixes one
00077  * potential source of "denial of service" attacks).
00078  * 
00079  * CGI actions file editor that works and is actually useful.
00080  * 
00081  * Ability to toggle JunkBuster remotely using a CGI call.
00082  * 
00083  * You can turn off both the above features in the main configuration
00084  * file, e.g. if you are running a multi-user proxy.
00085  * 
00086  * Revision 1.3  2001/10/14 22:00:32  jongfoster
00087  * Adding support for a 404 error when an invalid CGI page is requested.
00088  * 
00089  * Revision 1.2  2001/10/02 15:31:20  oes
00090  * Introduced show-request cgi
00091  * 
00092  * Revision 1.1  2001/09/16 17:08:54  jongfoster
00093  * Moving simple CGI functions from cgi.c to new file cgisimple.c
00094  * 
00095  * 
00096  */
00097 /* *****************************************************************/
00098 
00099 
00100 #include "project.h"
00101 
00102 #ifdef __cplusplus
00103 extern "C" {
00104 #endif
00105 
00106 /*
00107  * CGI functions
00108  */
00109 extern jb_err cgi_default      (struct client_state *csp,
00110                                 struct http_response *rsp,
00111                                 const struct map *parameters);
00112 extern jb_err cgi_error_404    (struct client_state *csp,
00113                                 struct http_response *rsp,
00114                                 const struct map *parameters);
00115 extern jb_err cgi_robots_txt   (struct client_state *csp,
00116                                 struct http_response *rsp,
00117                                 const struct map *parameters);
00118 extern jb_err cgi_send_banner  (struct client_state *csp,
00119                                 struct http_response *rsp,
00120                                 const struct map *parameters);
00121 extern jb_err cgi_show_status  (struct client_state *csp,
00122                                 struct http_response *rsp,
00123                                 const struct map *parameters);
00124 extern jb_err cgi_show_url_info(struct client_state *csp,
00125                                 struct http_response *rsp,
00126                                 const struct map *parameters);
00127 extern jb_err cgi_show_version (struct client_state *csp,
00128                                 struct http_response *rsp,
00129                                 const struct map *parameters);
00130 extern jb_err cgi_show_request (struct client_state *csp,
00131                                 struct http_response *rsp,
00132                                 const struct map *parameters);
00133 extern jb_err cgi_transparent_image (struct client_state *csp,
00134                                      struct http_response *rsp,
00135                                      const struct map *parameters);
00136 extern jb_err cgi_send_stylesheet(struct client_state *csp,
00137                                   struct http_response *rsp,
00138                                   const struct map *parameters);
00139 
00140 #ifdef FEATURE_GRACEFUL_TERMINATION
00141 extern jb_err cgi_die (struct client_state *csp,
00142                        struct http_response *rsp,
00143                        const struct map *parameters);
00144 #endif
00145 
00146 /* Revision control strings from this header and associated .c file */
00147 
00148 /** Version information about cgisimple.c. */
00149 extern const char cgisimple_rcs[];
00150 
00151 /** Version information about cgisimple.h. */
00152 extern const char cgisimple_h_rcs[];
00153 
00154 #ifdef __cplusplus
00155 } /* extern "C" */
00156 #endif
00157 
00158 #endif /* ndef CGISIMPLE_H_INCLUDED */
00159 
00160 /*
00161   Local Variables:
00162   tab-width: 3
00163   end:
00164 */

Generated on Tue Jun 4 18:54:48 2002 for Privoxy 3.1.1 by doxygen1.2.15