Google Images need img-reorder turned off.
[privoxy.git] / cgisimple.h
1 #ifndef CGISIMPLE_H_INCLUDED
2 #define CGISIMPLE_H_INCLUDED
3 #define CGISIMPLE_H_VERSION "$Id: cgisimple.h,v 1.11 2002/04/05 15:50:53 oes Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/Attic/cgisimple.h,v $
7  *
8  * Purpose     :  Declares functions to intercept request, generate
9  *                html or gif answers, and to compose HTTP resonses.
10  *                
11  *                Functions declared include:
12  * 
13  *
14  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
15  *                Privoxy team. http://www.privoxy.org/
16  *
17  *                Based on the Internet Junkbuster originally written
18  *                by and Copyright (C) 1997 Anonymous Coders and 
19  *                Junkbusters Corporation.  http://www.junkbusters.com
20  *
21  *                This program is free software; you can redistribute it 
22  *                and/or modify it under the terms of the GNU General
23  *                Public License as published by the Free Software
24  *                Foundation; either version 2 of the License, or (at
25  *                your option) any later version.
26  *
27  *                This program is distributed in the hope that it will
28  *                be useful, but WITHOUT ANY WARRANTY; without even the
29  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
30  *                PARTICULAR PURPOSE.  See the GNU General Public
31  *                License for more details.
32  *
33  *                The GNU General Public License should be included with
34  *                this file.  If not, you can view it at
35  *                http://www.gnu.org/copyleft/gpl.html
36  *                or write to the Free Software Foundation, Inc., 59
37  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
38  *
39  * Revisions   :
40  *    $Log: cgisimple.h,v $
41  *    Revision 1.11  2002/04/05 15:50:53  oes
42  *    added send-stylesheet CGI
43  *
44  *    Revision 1.10  2002/03/26 22:29:54  swa
45  *    we have a new homepage!
46  *
47  *    Revision 1.9  2002/03/24 13:25:43  swa
48  *    name change related issues
49  *
50  *    Revision 1.8  2002/03/16 23:54:06  jongfoster
51  *    Adding graceful termination feature, to help look for memory leaks.
52  *    If you enable this (which, by design, has to be done by hand
53  *    editing config.h) and then go to http://i.j.b/die, then the program
54  *    will exit cleanly after the *next* request.  It should free all the
55  *    memory that was used.
56  *
57  *    Revision 1.7  2002/03/08 16:43:59  oes
58  *    Renamed cgi_transparent_png to cgi_transparent_image
59  *
60  *    Revision 1.6  2002/03/07 03:48:59  oes
61  *     - Changed built-in images from GIF to PNG
62  *       (with regard to Unisys patent issue)
63  *
64  *    Revision 1.5  2002/01/22 23:26:03  jongfoster
65  *    Adding cgi_transparent_gif() for http://i.j.b/t
66  *
67  *    Revision 1.4  2001/10/23 21:48:19  jongfoster
68  *    Cleaning up error handling in CGI functions - they now send back
69  *    a HTML error page and should never cause a FATAL error.  (Fixes one
70  *    potential source of "denial of service" attacks).
71  *
72  *    CGI actions file editor that works and is actually useful.
73  *
74  *    Ability to toggle JunkBuster remotely using a CGI call.
75  *
76  *    You can turn off both the above features in the main configuration
77  *    file, e.g. if you are running a multi-user proxy.
78  *
79  *    Revision 1.3  2001/10/14 22:00:32  jongfoster
80  *    Adding support for a 404 error when an invalid CGI page is requested.
81  *
82  *    Revision 1.2  2001/10/02 15:31:20  oes
83  *    Introduced show-request cgi
84  *
85  *    Revision 1.1  2001/09/16 17:08:54  jongfoster
86  *    Moving simple CGI functions from cgi.c to new file cgisimple.c
87  *
88  *
89  **********************************************************************/
90 \f
91
92 #include "project.h"
93
94 #ifdef __cplusplus
95 extern "C" {
96 #endif
97
98 /*
99  * CGI functions
100  */
101 extern jb_err cgi_default      (struct client_state *csp,
102                                 struct http_response *rsp,
103                                 const struct map *parameters);
104 extern jb_err cgi_error_404    (struct client_state *csp,
105                                 struct http_response *rsp,
106                                 const struct map *parameters);
107 extern jb_err cgi_robots_txt   (struct client_state *csp,
108                                 struct http_response *rsp,
109                                 const struct map *parameters);
110 extern jb_err cgi_send_banner  (struct client_state *csp,
111                                 struct http_response *rsp,
112                                 const struct map *parameters);
113 extern jb_err cgi_show_status  (struct client_state *csp,
114                                 struct http_response *rsp,
115                                 const struct map *parameters);
116 extern jb_err cgi_show_url_info(struct client_state *csp,
117                                 struct http_response *rsp,
118                                 const struct map *parameters);
119 extern jb_err cgi_show_version (struct client_state *csp,
120                                 struct http_response *rsp,
121                                 const struct map *parameters);
122 extern jb_err cgi_show_request (struct client_state *csp,
123                                 struct http_response *rsp,
124                                 const struct map *parameters);
125 extern jb_err cgi_transparent_image (struct client_state *csp,
126                                      struct http_response *rsp,
127                                      const struct map *parameters);
128 extern jb_err cgi_send_stylesheet(struct client_state *csp,
129                                   struct http_response *rsp,
130                                   const struct map *parameters);
131
132 #ifdef FEATURE_GRACEFUL_TERMINATION
133 extern jb_err cgi_die (struct client_state *csp,
134                        struct http_response *rsp,
135                        const struct map *parameters);
136 #endif
137
138 /* Revision control strings from this header and associated .c file */
139 extern const char cgisimple_rcs[];
140 extern const char cgisimple_h_rcs[];
141
142 #ifdef __cplusplus
143 } /* extern "C" */
144 #endif
145
146 #endif /* ndef CGISIMPLE_H_INCLUDED */
147
148 /*
149   Local Variables:
150   tab-width: 3
151   end:
152 */