X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=actions.h;h=3b57c2b236510bd31805883826e21bf34d6cf4f1;hp=c823a6561b6d477a8680e865f796c9223ddc6c20;hb=291f91036dabb40b2323a118dd34c368ae2c6848;hpb=2465a9102eb7d4f7a53bd454596e61edd16acb85 diff --git a/actions.h b/actions.h index c823a656..3b57c2b2 100644 --- a/actions.h +++ b/actions.h @@ -1,6 +1,6 @@ #ifndef ACTIONS_H_INCLUDED #define ACTIONS_H_INCLUDED -#define ACTIONS_H_VERSION "$Id: actions.h,v 1.3 2001/09/14 00:17:32 jongfoster Exp $" +#define ACTIONS_H_VERSION "$Id: actions.h,v 1.18 2008/03/30 14:52:00 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/actions.h,v $ @@ -8,8 +8,8 @@ * Purpose : Declares functions to work with actions files * Functions declared include: FIXME * - * Copyright : Written by and Copyright (C) 2001 the SourceForge - * IJBSWA team. http://ijbswa.sourceforge.net + * Copyright : Written by and Copyright (C) 2001-2007 the SourceForge + * Privoxy team. http://www.privoxy.org/ * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -33,21 +33,8 @@ * or write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * Revisions : - * $Log: actions.h,v $ - * Revision 1.3 2001/09/14 00:17:32 jongfoster - * Tidying up memory allocation. New function init_action(). - * - * Revision 1.2 2001/07/29 19:01:11 jongfoster - * Changed _FILENAME_H to FILENAME_H_INCLUDED. - * Added forward declarations for needed structures. - * - * Revision 1.1 2001/05/31 21:16:46 jongfoster - * Moved functions to process the action list into this new file. - * - * *********************************************************************/ - + #ifdef __cplusplus extern "C" { @@ -58,26 +45,49 @@ struct action_spec; struct current_action_spec; struct client_state; + + +/* This structure is used to hold user-defined aliases */ +struct action_alias +{ + const char * name; + struct action_spec action[1]; + struct action_alias * next; +}; + + +extern jb_err get_actions (char *line, + struct action_alias * alias_list, + struct action_spec *cur_action); +extern void free_alias_list(struct action_alias *alias_list); + extern void init_action(struct action_spec *dest); extern void free_action(struct action_spec *src); -extern void merge_actions (struct action_spec *dest, +extern jb_err merge_actions (struct action_spec *dest, + const struct action_spec *src); +#if 0 +extern int update_action_bits_for_all_tags(struct client_state *csp); +#endif +extern int update_action_bits_for_tag(struct client_state *csp, const char *tag); +extern jb_err copy_action (struct action_spec *dest, const struct action_spec *src); -extern void copy_action (struct action_spec *dest, - const struct action_spec *src); -extern char * actions_to_text (struct action_spec *action); -#ifdef FEATURE_CGI_EDIT_ACTIONS -extern char * actions_to_html (struct action_spec *action); -#endif /* def FEATURE_CGI_EDIT_ACTIONS */ - +extern char * actions_to_text (const struct action_spec *action); +extern char * actions_to_html (const struct client_state *csp, + const struct action_spec *action); extern void init_current_action (struct current_action_spec *dest); extern void free_current_action (struct current_action_spec *src); -extern void merge_current_action (struct current_action_spec *dest, +extern jb_err merge_current_action (struct current_action_spec *dest, const struct action_spec *src); -extern char * current_action_to_text(struct current_action_spec *action); +extern char * current_action_to_html(const struct client_state *csp, + const struct current_action_spec *action); -extern int get_action_token(char **line, char **name, char **value); +extern jb_err get_action_token(char **line, char **name, char **value); extern void unload_actions_file(void *file_data); -extern int load_actions_file(struct client_state *csp); +extern int load_action_files(struct client_state *csp); + +#ifdef FEATURE_GRACEFUL_TERMINATION +void unload_current_actions_file(void); +#endif /* Revision control strings from this header and associated .c file */