00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __WVENCODER_H
00013 #define __WVENCODER_H
00014
00015 #include "wvbuffer.h"
00016
00017 class WvEncoder
00018 {
00019 public:
00020 WvEncoder();
00021 virtual ~WvEncoder();
00022
00023 virtual bool isok() const;
00024 void encode(const void *in, size_t insize, bool flush);
00025 void flush()
00026 { encode(NULL, 0, true); }
00027
00028 WvBuffer outbuf;
00029
00030 protected:
00031
00032
00033 virtual size_t do_encode(const unsigned char *in, size_t insize,
00034 bool flush) = 0;
00035 };
00036
00037 #endif // __WVENCODER_H