view src/decode.h @ 1494:9225a90ad7dd

make Doctree a non-virtual class Doctree now is a proper class with it's own implementation. StyleEngine no longer needs to provide the Doctree interface itself. This hopefully make the code easier to understand and should also be a bit faster as no virtual methods are involved.
author Johannes Hofmann <>
date Thu, 07 Jan 2010 16:23:05 +0100
parents e5feb6331e6a
line wrap: on
line source
#ifndef __DECODE_H__
#define __DECODE_H__

#include "../dlib/dlib.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef struct _Decode    Decode;

struct _Decode {
   char *buffer;
   Dstr *leftover;
   void *state;
   Dstr *(*decode) (Decode *dc, const char *instr, int inlen);
   void (*free) (Decode *dc);

Decode *a_Decode_transfer_init(const char *format);
Decode *a_Decode_content_init(const char *format);
Decode *a_Decode_charset_init(const char *format);
Dstr *a_Decode_process(Decode *dc, const char *instr, int inlen);
void a_Decode_free(Decode *dc);

#ifdef __cplusplus
#endif /* __cplusplus */

#endif /* __DECODE_H__ */