Two changes suggested by Roger Dingledine:
[privoxy.git] / cgiedit.h
1 #ifndef CGIEDIT_H_INCLUDED
2 #define CGIEDIT_H_INCLUDED
3 #define CGIEDIT_H_VERSION "$Id: cgiedit.h,v 1.9 2006/07/18 14:48:45 david__schmidt Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.h,v $
7  *
8  * Purpose     :  CGI-based actionsfile editor.
9  *                
10  *                Functions declared include:
11  * 
12  *
13  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
14  *                Privoxy team. http://www.privoxy.org/
15  *
16  *                Based on the Internet Junkbuster originally written
17  *                by and Copyright (C) 1997 Anonymous Coders and 
18  *                Junkbusters Corporation.  http://www.junkbusters.com
19  *
20  *                This program is free software; you can redistribute it 
21  *                and/or modify it under the terms of the GNU General
22  *                Public License as published by the Free Software
23  *                Foundation; either version 2 of the License, or (at
24  *                your option) any later version.
25  *
26  *                This program is distributed in the hope that it will
27  *                be useful, but WITHOUT ANY WARRANTY; without even the
28  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
29  *                PARTICULAR PURPOSE.  See the GNU General Public
30  *                License for more details.
31  *
32  *                The GNU General Public License should be included with
33  *                this file.  If not, you can view it at
34  *                http://www.gnu.org/copyleft/gpl.html
35  *                or write to the Free Software Foundation, Inc., 59
36  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
37  *
38  * Revisions   :
39  *    $Log: cgiedit.h,v $
40  *    Revision 1.9  2006/07/18 14:48:45  david__schmidt
41  *    Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
42  *    with what was really the latest development (the v_3_0_branch branch)
43  *
44  *    Revision 1.7.2.2  2004/02/17 13:30:23  oes
45  *    Moved cgi_error_disabled() from cgiedit.c to
46  *    cgi.c to re-enable build with --disable-editor.
47  *    Fixes Bug #892744. Thanks to Matthew Fischer
48  *    for spotting.
49  *
50  *    Revision 1.7.2.1  2002/11/28 18:15:17  oes
51  *    Added cgi_error_disabled
52  *
53  *    Revision 1.7  2002/03/26 22:29:54  swa
54  *    we have a new homepage!
55  *
56  *    Revision 1.6  2002/03/24 13:25:43  swa
57  *    name change related issues
58  *
59  *    Revision 1.5  2002/01/22 23:24:48  jongfoster
60  *    Adding edit-actions-section-swap
61  *
62  *    Revision 1.4  2001/11/13 00:28:51  jongfoster
63  *    Adding new CGIs for use by non-JavaScript browsers:
64  *      edit-actions-url-form
65  *      edit-actions-add-url-form
66  *      edit-actions-remove-url-form
67  *
68  *    Revision 1.3  2001/10/23 21:48:19  jongfoster
69  *    Cleaning up error handling in CGI functions - they now send back
70  *    a HTML error page and should never cause a FATAL error.  (Fixes one
71  *    potential source of "denial of service" attacks).
72  *
73  *    CGI actions file editor that works and is actually useful.
74  *
75  *    Ability to toggle JunkBuster remotely using a CGI call.
76  *
77  *    You can turn off both the above features in the main configuration
78  *    file, e.g. if you are running a multi-user proxy.
79  *
80  *    Revision 1.2  2001/10/14 22:12:49  jongfoster
81  *    New version of CGI-based actionsfile editor.
82  *    Major changes, including:
83  *    - Completely new file parser and file output routines
84  *    - edit-actions CGI renamed edit-actions-for-url
85  *    - All CGIs now need a filename parameter, except for...
86  *    - New CGI edit-actions which doesn't need a filename,
87  *      to allow you to start the editor up.
88  *    - edit-actions-submit now works, and now automatically
89  *      redirects you back to the main edit-actions-list handler.
90  *
91  *    Revision 1.1  2001/09/16 15:47:37  jongfoster
92  *    First version of CGI-based edit interface.  This is very much a
93  *    work-in-progress, and you can't actually use it to edit anything
94  *    yet.  You must #define FEATURE_CGI_EDIT_ACTIONS for these changes
95  *    to have any effect.
96  *
97  *
98  **********************************************************************/
99 \f
100
101 #include "project.h"
102
103 #ifdef __cplusplus
104 extern "C" {
105 #endif
106
107 /*
108  * CGI functions
109  */
110 #ifdef FEATURE_CGI_EDIT_ACTIONS
111 extern jb_err cgi_edit_actions        (struct client_state *csp,
112                                        struct http_response *rsp,
113                                        const struct map *parameters);
114 extern jb_err cgi_edit_actions_for_url(struct client_state *csp,
115                                        struct http_response *rsp,
116                                        const struct map *parameters);
117 extern jb_err cgi_edit_actions_list   (struct client_state *csp,
118                                        struct http_response *rsp,
119                                        const struct map *parameters);
120 extern jb_err cgi_edit_actions_submit (struct client_state *csp,
121                                        struct http_response *rsp,
122                                        const struct map *parameters);
123 extern jb_err cgi_edit_actions_url    (struct client_state *csp,
124                                        struct http_response *rsp,
125                                        const struct map *parameters);
126 extern jb_err cgi_edit_actions_url_form(struct client_state *csp,
127                                         struct http_response *rsp,
128                                         const struct map *parameters);
129 extern jb_err cgi_edit_actions_add_url(struct client_state *csp,
130                                        struct http_response *rsp,
131                                        const struct map *parameters);
132 extern jb_err cgi_edit_actions_add_url_form(struct client_state *csp,
133                                             struct http_response *rsp,
134                                             const struct map *parameters);
135 extern jb_err cgi_edit_actions_remove_url    (struct client_state *csp,
136                                               struct http_response *rsp,
137                                               const struct map *parameters);
138 extern jb_err cgi_edit_actions_remove_url_form(struct client_state *csp,
139                                             struct http_response *rsp,
140                                             const struct map *parameters);
141 extern jb_err cgi_edit_actions_section_remove(struct client_state *csp,
142                                               struct http_response *rsp,
143                                               const struct map *parameters);
144 extern jb_err cgi_edit_actions_section_add   (struct client_state *csp,
145                                               struct http_response *rsp,
146                                               const struct map *parameters);
147 extern jb_err cgi_edit_actions_section_swap  (struct client_state *csp,
148                                               struct http_response *rsp,
149                                               const struct map *parameters);
150 #endif /* def FEATURE_CGI_EDIT_ACTIONS */
151 #ifdef FEATURE_TOGGLE
152 extern jb_err cgi_toggle(struct client_state *csp,
153                          struct http_response *rsp,
154                          const struct map *parameters);
155 #endif /* def FEATURE_TOGGLE */
156
157 /* Revision control strings from this header and associated .c file */
158 extern const char cgiedit_rcs[];
159 extern const char cgiedit_h_rcs[];
160
161 #ifdef __cplusplus
162 } /* extern "C" */
163 #endif
164
165 #endif /* ndef CGI_H_INCLUDED */
166
167 /*
168   Local Variables:
169   tab-width: 3
170   end:
171 */