summaryrefslogtreecommitdiff
path: root/src/Decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Decoder.h')
-rw-r--r--src/Decoder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Decoder.h b/src/Decoder.h
index 3b5c0df0..f8cb4cc9 100644
--- a/src/Decoder.h
+++ b/src/Decoder.h
@@ -40,16 +40,20 @@
namespace aria2 {
+// Interface for basic decoding functionality.
class Decoder {
public:
virtual ~Decoder() {}
+ // init() must be called before calling decode().
virtual void init() = 0;
virtual std::string decode(const unsigned char* inbuf, size_t inlen) = 0;
virtual bool finished() = 0;
+ // The call of release() will free allocated resources.
+ // After calling release(), the object can be reused by calling init().
virtual void release() = 0;
virtual const std::string& getName() const = 0;