Dillo v3.1.1-91-g6d5b3ee3
Loading...
Searching...
No Matches
decode.h
Go to the documentation of this file.
1#ifndef __DECODE_H__
2#define __DECODE_H__
3
4#include "../dlib/dlib.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif /* __cplusplus */
9
10typedef struct Decode {
11 char *buffer;
13 void *state;
14 Dstr *(*decode) (struct Decode *dc, const char *instr, int inlen);
15 void (*free) (struct Decode *dc);
17
18/* I'm not going to shoehorn the decoders into the same form anymore. They
19 * can evolve independently.
20 */
26
27DecodeTransfer *a_Decode_transfer_init(const char *format);
28Dstr *a_Decode_transfer_process(DecodeTransfer *dc, const char *instr,
29 int inlen);
32
33Decode *a_Decode_content_init(const char *format);
34Decode *a_Decode_charset_init(const char *format);
35Dstr *a_Decode_process(Decode *dc, const char *instr, int inlen);
36void a_Decode_free(Decode *dc);
37
38#ifdef __cplusplus
39}
40#endif /* __cplusplus */
41
42#endif /* __DECODE_H__ */
unsigned char bool_t
Definition d_size.h:21
Decode * a_Decode_charset_init(const char *format)
Initialize decoder to translate from any character set known to iconv() to UTF-8.
Definition decode.c:365
Dstr * a_Decode_transfer_process(DecodeTransfer *dc, const char *instr, int inlen)
Decode 'Transfer-Encoding: chunked' data.
Definition decode.c:26
void a_Decode_transfer_free(DecodeTransfer *dc)
Definition decode.c:90
Decode * a_Decode_content_init(const char *format)
Initialize content decoder.
Definition decode.c:327
DecodeTransfer * a_Decode_transfer_init(const char *format)
Initialize transfer decoder.
Definition decode.c:291
Dstr * a_Decode_process(Decode *dc, const char *instr, int inlen)
Decode data.
Definition decode.c:392
void a_Decode_free(Decode *dc)
Definition decode.c:400
bool_t a_Decode_transfer_finished(DecodeTransfer *dc)
Definition decode.c:85
void * state
Definition decode.h:23
Dstr * leftover
Definition decode.h:22
bool_t finished
has the terminating chunk been seen?
Definition decode.h:24
char * buffer
Definition decode.h:11
Dstr * leftover
Definition decode.h:12
void * state
Definition decode.h:13
void(* free)(struct Decode *dc)
Definition decode.h:15
Definition dlib.h:102