aboutsummaryrefslogtreecommitdiff
path: root/lib/buffer.h
blob: c5ffadc0c483cf219b67b846959fc5436015e61d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2000-2001 Brad Hughes <bhughes@trolltech.com>
//
// Use, modification and distribution is allowed without limitation,
// warranty, or liability of any kind.
//

#ifndef   __buffer_h
#define   __buffer_h

#include "constants.h"

class Buffer
{
public:
    Buffer()
    {
        data = new unsigned char[Buffer::size()];
        nbytes = 0;
        rate = 0;
        exceeding = 0;
    }
    ~Buffer()
    {
        delete data;
        data = 0;
        nbytes = 0;
        rate = 0;
        exceeding = 0;
    }

    unsigned char *data;
    unsigned long nbytes;
    unsigned long rate;
    unsigned long exceeding;

    static unsigned long size()
    {
        return globalBlockSize;
    }
};


#endif // __buffer_h