Reorder gateway_host in struct forward_spec to save memory
[privoxy.git] / client-tags.h
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
31 extern int client_tag_match(const struct pattern_spec *pattern,
32                             const struct list *tags);
33 extern void get_tag_list_for_client(struct list *tag_list,
34                                     const char *client_address);
35 extern time_t get_next_tag_timeout_for_client(const char *client_address);
36 extern jb_err disable_client_specific_tag(struct client_state *csp,
37                                           const char *tag_name);
38 extern jb_err enable_client_specific_tag(struct client_state *csp,
39                                          const char *tag_name,
40                                          const time_t time_to_live);
41 extern int client_has_requested_tag(const char *client_address,
42                                     const char *tag);
43 extern void set_client_address(struct client_state *csp,
44                                const struct list *headers);
45
46 #define CLIENT_TAG_LENGTH_MAX 50
47 #endif