Added #undef EINTR to avoid warnings
[privoxy.git] / actionlist.h
1 /*********************************************************************
2  *
3  * File        :  $Source: /cvsroot/ijbswa/current/actionlist.h,v $
4  *
5  * Purpose     :  Master list of supported actions.
6  *                Not really a header, since it generates code.
7  *                This is included (3 times!) from actions.c
8  *                Each time, the following macros are defined to
9  *                suitable values beforehand:
10  *                    DEFINE_ACTION_MULTI()
11  *                    DEFINE_ACTION_STRING()
12  *                    DEFINE_ACTION_BOOL()
13  *                    DEFINE_ACTION_ALIAS
14  *
15  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
16  *                IJBSWA team.  http://ijbswa.sourceforge.net
17  *
18  *                Based on the Internet Junkbuster originally written
19  *                by and Copyright (C) 1997 Anonymous Coders and 
20  *                Junkbusters Corporation.  http://www.junkbusters.com
21  *
22  *                This program is free software; you can redistribute it 
23  *                and/or modify it under the terms of the GNU General
24  *                Public License as published by the Free Software
25  *                Foundation; either version 2 of the License, or (at
26  *                your option) any later version.
27  *
28  *                This program is distributed in the hope that it will
29  *                be useful, but WITHOUT ANY WARRANTY; without even the
30  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
31  *                PARTICULAR PURPOSE.  See the GNU General Public
32  *                License for more details.
33  *
34  *                The GNU General Public License should be included with
35  *                this file.  If not, you can view it at
36  *                http://www.gnu.org/copyleft/gpl.html
37  *                or write to the Free Software Foundation, Inc., 59
38  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
39  *
40  * Revisions   :
41  *    $Log: actionlist.h,v $
42  *    Revision 1.7  2001/10/07 15:33:59  oes
43  *    Introduced a +no-compression action
44  *    Introduced a +downgrade action
45  *
46  *    Revision 1.6  2001/09/16 15:47:37  jongfoster
47  *    First version of CGI-based edit interface.  This is very much a
48  *    work-in-progress, and you can't actually use it to edit anything
49  *    yet.  You must #define FEATURE_CGI_EDIT_ACTIONS for these changes
50  *    to have any effect.
51  *
52  *    Revision 1.5  2001/07/18 12:27:03  oes
53  *    Changed deanimate-gifs to string action
54  *
55  *    Revision 1.4  2001/07/13 13:52:12  oes
56  *     - Formatting
57  *     - Introduced new action ACTION_DEANIMATE
58  *
59  *    Revision 1.3  2001/06/07 23:03:56  jongfoster
60  *    Added standard comment at top of file.
61  *
62  *
63  *********************************************************************/
64 \f
65
66 #if !(defined(DEFINE_ACTION_BOOL) && defined(DEFINE_ACTION_MULTI) && defined(DEFINE_ACTION_STRING))
67 #error Please define lots of macros before including "actionlist.h".
68 #endif /* !defined(all the DEFINE_ACTION_xxx macros) */
69
70 #ifndef DEFINE_CGI_PARAM_RADIO
71 #define DEFINE_CGI_PARAM_RADIO(name, bit, index, value, is_default)
72 #define DEFINE_CGI_PARAM_CUSTOM(name, bit, index, default_val)
73 #define DEFINE_CGI_PARAM_NO_RADIO(name, bit, index, default_val)
74 #endif /* ndef DEFINE_CGI_PARAM_RADIO */
75
76 DEFINE_ACTION_MULTI      ("add-header",      ACTION_MULTI_ADD_HEADER)
77 DEFINE_ACTION_BOOL       ("block",           ACTION_BLOCK)
78 DEFINE_ACTION_STRING     ("deanimate-gifs",  ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE)
79 DEFINE_CGI_PARAM_RADIO   ("deanimate-gifs",  ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE,     "first", 0)
80 DEFINE_CGI_PARAM_RADIO   ("deanimate-gifs",  ACTION_DEANIMATE,       ACTION_STRING_DEANIMATE,     "last",  1)
81 DEFINE_ACTION_BOOL       ("downgrade",       ACTION_DOWNGRADE)
82 DEFINE_ACTION_BOOL       ("fast-redirects",  ACTION_FAST_REDIRECTS)
83 DEFINE_ACTION_BOOL       ("filter",          ACTION_FILTER)
84 DEFINE_ACTION_BOOL       ("hide-forwarded",  ACTION_HIDE_FORWARDED)
85 DEFINE_ACTION_STRING     ("hide-from",       ACTION_HIDE_FROM,       ACTION_STRING_FROM)
86 DEFINE_CGI_PARAM_RADIO   ("hide-from",       ACTION_HIDE_FROM,       ACTION_STRING_FROM,          "block", 1)
87 DEFINE_CGI_PARAM_CUSTOM  ("hide-from",       ACTION_HIDE_FROM,       ACTION_STRING_FROM,          "spam_me_senseless@sittingduck.xyz")
88 DEFINE_ACTION_STRING     ("hide-referer",    ACTION_HIDE_REFERER,    ACTION_STRING_REFERER)
89 DEFINE_CGI_PARAM_RADIO   ("hide-referer",    ACTION_HIDE_REFERER,    ACTION_STRING_REFERER,       "forge", 1)
90 DEFINE_CGI_PARAM_RADIO   ("hide-referer",    ACTION_HIDE_REFERER,    ACTION_STRING_REFERER,       "block", 0)
91 DEFINE_CGI_PARAM_CUSTOM  ("hide-referer",    ACTION_HIDE_REFERER,    ACTION_STRING_REFERER,       "http://www.google.com/")
92 DEFINE_ACTION_STRING     ("hide-user-agent", ACTION_HIDE_USER_AGENT, ACTION_STRING_USER_AGENT)
93 DEFINE_CGI_PARAM_NO_RADIO("hide-user-agent", ACTION_HIDE_USER_AGENT, ACTION_STRING_USER_AGENT,    "JunkBuster/3.0 (Anonymized)")
94 DEFINE_ACTION_BOOL       ("image",           ACTION_IMAGE)
95 DEFINE_ACTION_STRING     ("image-blocker",   ACTION_IMAGE_BLOCKER,   ACTION_STRING_IMAGE_BLOCKER)
96 DEFINE_CGI_PARAM_RADIO   ("image-blocker",   ACTION_IMAGE_BLOCKER,   ACTION_STRING_IMAGE_BLOCKER, "logo", 1)
97 DEFINE_CGI_PARAM_RADIO   ("image-blocker",   ACTION_IMAGE_BLOCKER,   ACTION_STRING_IMAGE_BLOCKER, "blank", 0)
98 DEFINE_CGI_PARAM_CUSTOM  ("image-blocker",   ACTION_IMAGE_BLOCKER,   ACTION_STRING_IMAGE_BLOCKER, "http://")
99 DEFINE_ACTION_STRING     ("limit-connect",   ACTION_LIMIT_CONNECT,   ACTION_STRING_LIMIT_CONNECT)
100 DEFINE_CGI_PARAM_NO_RADIO("limit-connect",   ACTION_LIMIT_CONNECT,   ACTION_STRING_LIMIT_CONNECT,  "443")
101 DEFINE_ACTION_BOOL       ("no-compression",  ACTION_NO_COMPRESSION)
102 DEFINE_ACTION_BOOL       ("no-cookies-read", ACTION_NO_COOKIE_READ)
103 DEFINE_ACTION_BOOL       ("no-cookies-set",  ACTION_NO_COOKIE_SET)
104 DEFINE_ACTION_BOOL       ("no-popups",       ACTION_NO_POPUPS)
105 DEFINE_ACTION_BOOL       ("vanilla-wafer",   ACTION_VANILLA_WAFER)
106 DEFINE_ACTION_MULTI      ("wafer",           ACTION_MULTI_WAFER)
107 #if DEFINE_ACTION_ALIAS
108 DEFINE_ACTION_BOOL       ("no-popup",        ACTION_NO_POPUPS)
109 DEFINE_ACTION_STRING     ("hide-referrer",   ACTION_HIDE_REFERER,    ACTION_STRING_REFERER)
110 #endif /* if DEFINE_ACTION_ALIAS */
111
112 #undef DEFINE_ACTION_MULTI
113 #undef DEFINE_ACTION_STRING
114 #undef DEFINE_ACTION_BOOL
115 #undef DEFINE_ACTION_ALIAS
116 #undef DEFINE_CGI_PARAM_CUSTOM
117 #undef DEFINE_CGI_PARAM_RADIO
118 #undef DEFINE_CGI_PARAM_NO_RADIO
119