summaryrefslogtreecommitdiff
path: root/H64E-2/h64e-model.h
blob: 516f8dc6eb52113b227d5461287166aad3d586b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
//  h64e-model.h
//  H64E-2
//
//  Created by dianshi on 3/13/20.
//  Copyright © 2020 dianshi. All rights reserved.
//

#ifndef h64e_model_h
#define h64e_model_h

#include <stdio.h>
#include <string.h>

typedef int (*trnf_clb)(char*);

typedef struct H64E_stream_in {
    int cur_size;
    int size;
    uint8_t *buf;
} H64E_stream_in;

//used to get collected data
int h64e_si_init(H64E_stream_in *in, ssize_t size);
int h64e_si_data_in(H64E_stream_in *in, uint8_t *data, size_t size);
int h64e_si_data_out(H64E_stream_in *in, uint8_t *data, size_t size);

typedef struct H64E_stream_out {
    int cur_size;
    int size;
    uint8_t *buf;
} H64E_stream_out;

//using to collect output formated data
int h64e_so_init(H64E_stream_out *out, ssize_t size);
int h64e_so_data_in(H64E_stream_in *out, uint8_t *data, size_t size);
int h64e_so_data_out(H64E_stream_in *out, uint8_t *data, size_t size);

#endif /* h64e_model_h */