actions.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. struct action_spec;
  37. struct current_action_spec;
  38. struct client_state;
  39. /* This structure is used to hold user-defined aliases */
  40. struct action_alias
  41. {
  42. const char * name;
  43. struct action_spec action[1];
  44. struct action_alias * next;
  45. };
  46. extern jb_err get_actions (char *line,
  47. struct action_alias * alias_list,
  48. struct action_spec *cur_action);
  49. extern void free_alias_list(struct action_alias *alias_list);
  50. extern void init_action(struct action_spec *dest);
  51. extern void free_action(struct action_spec *src);
  52. extern jb_err merge_actions (struct action_spec *dest,
  53. const struct action_spec *src);
  54. extern int update_action_bits_for_tag(struct client_state *csp, const char *tag);
  55. extern jb_err check_negative_tag_patterns(struct client_state *csp, unsigned int flag);
  56. extern jb_err copy_action (struct action_spec *dest,
  57. const struct action_spec *src);
  58. extern char * actions_to_text (const struct action_spec *action);
  59. extern char * actions_to_html (const struct client_state *csp,
  60. const struct action_spec *action);
  61. extern void init_current_action (struct current_action_spec *dest);
  62. extern void free_current_action (struct current_action_spec *src);
  63. extern jb_err merge_current_action (struct current_action_spec *dest,
  64. const struct action_spec *src);
  65. extern char * current_action_to_html(const struct client_state *csp,
  66. const struct current_action_spec *action);
  67. extern char * actions_to_line_of_text(const struct current_action_spec *action);
  68. extern jb_err get_action_token(char **line, char **name, char **value);
  69. extern void unload_actions_file(void *file_data);
  70. extern int load_action_files(struct client_state *csp);
  71. #ifdef FUZZ
  72. extern int load_one_actions_file(struct client_state *csp, int fileid);
  73. #endif
  74. #ifdef FEATURE_GRACEFUL_TERMINATION
  75. void unload_current_actions_file(void);
  76. #endif
  77. #endif /* ndef ACTIONS_H_INCLUDED */
  78. /*
  79. Local Variables:
  80. tab-width: 3
  81. end:
  82. */