1 #ifndef ACTIONS_H_INCLUDED
2 #define ACTIONS_H_INCLUDED
3 /*********************************************************************
5 * File : $Source: /cvsroot/ijbswa/current/actions.h,v $
7 * Purpose : Declares functions to work with actions files
8 * Functions declared include: FIXME
10 * Copyright : Written by and Copyright (C) 2001-2007 members of the
11 * Privoxy team. https://www.privoxy.org/
13 * Based on the Internet Junkbuster originally written
14 * by and Copyright (C) 1997 Anonymous Coders and
15 * Junkbusters Corporation. http://www.junkbusters.com
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.
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.
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.
35 *********************************************************************/
39 struct current_action_spec;
44 /* This structure is used to hold user-defined aliases */
48 struct action_spec action[1];
49 struct action_alias * next;
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);
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);
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);
81 extern int load_one_actions_file(struct client_state *csp, int fileid);
84 #ifdef FEATURE_GRACEFUL_TERMINATION
85 void unload_current_actions_file(void);
89 #endif /* ndef ACTIONS_H_INCLUDED */