client-tags.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef CLIENT_TAGS_H_INCLUDED
  2. #define CLIENT_TAGS_H_INCLUDED
  3. /*********************************************************************
  4. *
  5. * File : $Source: /cvsroot/ijbswa/current/client-tags.h,v $
  6. *
  7. * Purpose : Declares functions for client-specific tags.
  8. *
  9. * Copyright : Copyright (C) 2016 Fabian Keil <fk@fabiankeil.de>
  10. *
  11. * This program is free software; you can redistribute it
  12. * and/or modify it under the terms of the GNU General
  13. * Public License as published by the Free Software
  14. * Foundation; either version 2 of the License, or (at
  15. * your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will
  18. * be useful, but WITHOUT ANY WARRANTY; without even the
  19. * implied warranty of MERCHANTABILITY or FITNESS FOR A
  20. * PARTICULAR PURPOSE. See the GNU General Public
  21. * License for more details.
  22. *
  23. * The GNU General Public License should be included with
  24. * this file. If not, you can view it at
  25. * http://www.gnu.org/copyleft/gpl.html
  26. * or write to the Free Software Foundation, Inc., 59
  27. * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  28. *
  29. *********************************************************************/
  30. extern int client_tag_match(const struct pattern_spec *pattern,
  31. const struct list *tags);
  32. extern void get_tag_list_for_client(struct list *tag_list,
  33. const char *client_address);
  34. extern time_t get_next_tag_timeout_for_client(const char *client_address);
  35. extern jb_err disable_client_specific_tag(struct client_state *csp,
  36. const char *tag_name);
  37. extern jb_err enable_client_specific_tag(struct client_state *csp,
  38. const char *tag_name,
  39. const time_t time_to_live);
  40. extern int client_has_requested_tag(const char *client_address,
  41. const char *tag);
  42. extern void set_client_address(struct client_state *csp,
  43. const struct list *headers);
  44. #define CLIENT_TAG_LENGTH_MAX 50
  45. #endif