Initial revision
[yazproxy-moved-to-github.git] / include / yazproxy / bw.h
1 /* $Id: bw.h,v 1.1 2004-04-11 11:37:01 adam Exp $
2    Copyright (c) 1998-2004, Index Data.
3
4 This file is part of the yaz-proxy.
5
6 Zebra is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
10
11 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Zebra; see the file LICENSE.proxy.  If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.
20  */
21
22 class YAZ_EXPORT Yaz_bw {
23  public:
24     Yaz_bw(int sz);
25     ~Yaz_bw();
26     void add_bytes(int m);
27     int get_total();
28  private:
29     long m_sec;   // time of most recent bucket
30     int *m_bucket;
31     int m_ptr;
32     int m_size;
33 };
34