Regenerate docs
[privoxy.git] / filters.h
1 #ifndef FILTERS_H_INCLUDED
2 #define FILTERS_H_INCLUDED
3 #define FILTERS_H_VERSION "$Id: filters.h,v 1.48 2016/12/24 16:00:49 fabiankeil Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/filters.h,v $
7  *
8  * Purpose     :  Declares functions to parse/crunch headers and pages.
9  *
10  * Copyright   :  Written by and Copyright (C) 2001-2010 the
11  *                Privoxy team. http://www.privoxy.org/
12  *
13  *                Based on the Internet Junkbuster originally written
14  *                by and Copyright (C) 1997 Anonymous Coders and
15  *                Junkbusters Corporation.  http://www.junkbusters.com
16  *
17  *                This program is free software; you can redistribute it
18  *                and/or modify it under the terms of the GNU General
19  *                Public License as published by the Free Software
20  *                Foundation; either version 2 of the License, or (at
21  *                your option) any later version.
22  *
23  *                This program is distributed in the hope that it will
24  *                be useful, but WITHOUT ANY WARRANTY; without even the
25  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
26  *                PARTICULAR PURPOSE.  See the GNU General Public
27  *                License for more details.
28  *
29  *                The GNU General Public License should be included with
30  *                this file.  If not, you can view it at
31  *                http://www.gnu.org/copyleft/gpl.html
32  *                or write to the Free Software Foundation, Inc., 59
33  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
34  *
35  *********************************************************************/
36
37
38 #include "project.h"
39
40 /*
41  * ACL checking
42  */
43 #ifdef FEATURE_ACL
44 extern int block_acl(const struct access_control_addr *dst, const struct client_state *csp);
45 extern int acl_addr(const char *aspec, struct access_control_addr *aca);
46 #endif /* def FEATURE_ACL */
47
48 /*
49  * Interceptors
50  */
51 extern struct http_response *block_url(struct client_state *csp);
52 extern struct http_response *redirect_url(struct client_state *csp);
53 #ifdef FEATURE_TRUST
54 extern struct http_response *trust_url(struct client_state *csp);
55 #endif /* def FEATURE_TRUST */
56
57 /*
58  * Request inspectors
59  */
60 #ifdef FEATURE_TRUST
61 extern int is_untrusted_url(const struct client_state *csp);
62 #endif /* def FEATURE_TRUST */
63 #ifdef FEATURE_IMAGE_BLOCKING
64 extern int is_imageurl(const struct client_state *csp);
65 #endif /* def FEATURE_IMAGE_BLOCKING */
66 extern int connect_port_is_forbidden(const struct client_state *csp);
67
68 /*
69  * Determining applicable actions
70  */
71 extern void get_url_actions(struct client_state *csp,
72                             struct http_request *http);
73
74 extern struct re_filterfile_spec *get_filter(const struct client_state *csp,
75                                              const char *requested_name,
76                                              enum filter_type requested_type);
77
78 /*
79  * Determining parent proxies
80  */
81 extern const struct forward_spec *forward_url(struct client_state *csp,
82                                               const struct http_request *http);
83
84 /*
85  * Content modification
86  */
87 extern char *execute_content_filters(struct client_state *csp);
88 extern char *execute_single_pcrs_command(char *subject, const char *pcrs_command, int *hits);
89 extern char *rewrite_url(char *old_url, const char *pcrs_command);
90 extern char *get_last_url(char *subject, const char *redirect_mode);
91
92 extern pcrs_job *compile_dynamic_pcrs_job_list(const struct client_state *csp, const struct re_filterfile_spec *b);
93
94 extern int content_requires_filtering(struct client_state *csp);
95 extern int content_filters_enabled(const struct current_action_spec *action);
96 extern int filters_available(const struct client_state *csp);
97
98 /*
99  * Handling Max-Forwards:
100  */
101 extern struct http_response *direct_response(struct client_state *csp);
102
103 /*
104  * Revision control strings from this header and associated .c file
105  */
106 extern const char filters_rcs[];
107 extern const char filters_h_rcs[];
108
109 #ifdef FUZZ
110 extern char *gif_deanimate_response(struct client_state *csp);
111 extern jb_err remove_chunked_transfer_coding(char *buffer, size_t *size);
112 #endif
113
114 #endif /* ndef FILTERS_H_INCLUDED */
115
116 /*
117   Local Variables:
118   tab-width: 3
119   end:
120 */