Upgrade a bunch of links to the homepage to https://
[privoxy.git] / actions.h
1 #ifndef ACTIONS_H_INCLUDED
2 #define ACTIONS_H_INCLUDED
3 /*********************************************************************
4  *
5  * File        :  $Source: /cvsroot/ijbswa/current/actions.h,v $
6  *
7  * Purpose     :  Declares functions to work with actions files
8  *                Functions declared include: FIXME
9  *
10  * Copyright   :  Written by and Copyright (C) 2001-2007 members of the
11  *                Privoxy team. https://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 struct action_spec;
39 struct current_action_spec;
40 struct client_state;
41
42
43
44 /* This structure is used to hold user-defined aliases */
45 struct action_alias
46 {
47    const char * name;
48    struct action_spec action[1];
49    struct action_alias * next;
50 };
51
52
53 extern jb_err get_actions (char *line,
54                            struct action_alias * alias_list,
55                            struct action_spec *cur_action);
56 extern void free_alias_list(struct action_alias *alias_list);
57
58 extern void init_action(struct action_spec *dest);
59 extern void free_action(struct action_spec *src);
60 extern jb_err merge_actions (struct action_spec *dest,
61                              const struct action_spec *src);
62 extern int update_action_bits_for_tag(struct client_state *csp, const char *tag);
63 extern jb_err check_negative_tag_patterns(struct client_state *csp, unsigned int flag);
64 extern jb_err copy_action (struct action_spec *dest,
65                            const struct action_spec *src);
66 extern char * actions_to_text     (const struct action_spec *action);
67 extern char * actions_to_html     (const struct client_state *csp,
68                                    const struct action_spec *action);
69 extern void init_current_action     (struct current_action_spec *dest);
70 extern void free_current_action     (struct current_action_spec *src);
71 extern jb_err merge_current_action  (struct current_action_spec *dest,
72                                      const struct action_spec *src);
73 extern char * current_action_to_html(const struct client_state *csp,
74                                      const struct current_action_spec *action);
75 extern char * actions_to_line_of_text(const struct current_action_spec *action);
76
77 extern jb_err get_action_token(char **line, char **name, char **value);
78 extern void unload_actions_file(void *file_data);
79 extern int load_action_files(struct client_state *csp);
80 #ifdef FUZZ
81 extern int load_one_actions_file(struct client_state *csp, int fileid);
82 #endif
83
84 #ifdef FEATURE_GRACEFUL_TERMINATION
85 void unload_current_actions_file(void);
86 #endif
87
88
89 #endif /* ndef ACTIONS_H_INCLUDED */
90
91 /*
92   Local Variables:
93   tab-width: 3
94   end:
95 */
96