Source

pyGAP / game / engine / codec / base.h

Full commit
#ifndef __CODEC_BASE_H__
#define __CODEC_BASE_H__

#include <stdint.h>


namespace codec {


class Base {
protected:
    Base() : result_(0) {};

public:
    virtual ~Base()     {};

    int get_result() { return result_; }
    virtual bool has_error() = 0;

    virtual bool init(uint8_t* output) = 0;
    virtual bool finish() = 0;

    virtual bool decode(uint8_t* output, uint32_t output_size, uint8_t* input,  uint32_t input_size) = 0;

protected:
    int     result_;
};


Base* create();


} /* namespace codec */


#endif