Initial drop of dashboard instrumentation - enabled with
[privoxy.git] / src / stats.h
1 #ifndef STATS_H_INCLUDED
2 #define STATS_H_INCLUDED
3 #define STATS_H_VERSION "$Id: stats.h,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/src/stats.h,v $
7  *
8  * Purpose     :  Functions and definitions for accumulating and
9  *                sending statistics to an "external" stats console
10  *
11  * Copyright   :  Written by and Copyright (C) 2002, 2003 the SourceForge
12  *                Privoxy team. http://www.privoxy.org/
13  *
14  *                Based on the Internet Junkbuster originally written
15  *                by and Copyright (C) 1997 Anonymous Coders and 
16  *                Junkbusters Corporation.  http://www.junkbusters.com
17  *
18  *                This program is free software; you can redistribute it 
19  *                and/or modify it under the terms of the GNU General
20  *                Public License as published by the Free Software
21  *                Foundation; either version 2 of the License, or (at
22  *                your option) any later version.
23  *
24  *                This program is distributed in the hope that it will
25  *                be useful, but WITHOUT ANY WARRANTY; without even the
26  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
27  *                PARTICULAR PURPOSE.  See the GNU General Public
28  *                License for more details.
29  *
30  *                The GNU General Public License should be included with
31  *                this file.  If not, you can view it at
32  *                http://www.gnu.org/copyleft/gpl.html
33  *                or write to the Free Software Foundation, Inc., 59
34  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
35  *
36  * Revisions   :
37  *    $Log: stats.h,v $
38  *
39  *********************************************************************/
40 \f
41
42 /* Revision control strings from this header and associated .c file */
43 extern const char stats_rcs[];
44 extern const char stats_h_rcs[];
45
46 /* Global variables */
47
48 /* These are the different types of statistics we will be gathering. */
49 #define STATS_REQUEST 0
50 #define STATS_FILTER 1
51 #define STATS_GIF_DEANIMATE 2
52 #define STATS_ACL_RESTRICT 3
53 #define STATS_IMAGE_BLOCK 4
54 #define STATS_COOKIE 5
55 #define STATS_REFERER 6
56 #define STATS_CLIENT_UA 7
57 #define STATS_CLIENT_FROM 8
58 #define STATS_CLIENT_X_FORWARDED 9
59 /** Define the maximum number of 'keys' we'll be sending.  Always keep this
60   * number one greater than the last actual key; it is used to define an 
61   * array (i.e. int stats[STATS_MAX_KEYS]. */
62 #define STATS_MAX_KEYS 10
63
64 /* Functions */
65
66 void init_stats_config(struct configuration_spec * config);
67 void update_stats_config(struct configuration_spec * config);
68 void accumulate_stats(int key, int value);
69 void *forward_stats();
70 void send_stats(int *p_local_stats_array[]);
71
72 #endif /* ndef STATS_H_INCLUDED */
73
74 /*
75   Local Variables:
76   tab-width: 3
77   end:
78 */