rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #ifndef __DATA_CODER_H__ |
| 2 | #define __DATA_CODER_H__ |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | char get_byte(char* buff, int* offset, int src_len); |
| 9 | short get_short(char* buff, int* offset, int src_len); |
| 10 | int get_int(char* buff, int* offset, int src_len); |
| 11 | long long get_long(char* buff, int* offset, int src_len); |
| 12 | float get_float(char* buff, int* offset, int src_len); |
| 13 | double get_double(char* buff, int* offset, int src_len); |
| 14 | char* get_string(char* buff, int* offset, int src_len); |
| 15 | char* get_string2(char* buff, int* offset, int src_len); |
| 16 | int get_binary(char* buff, int* offset, char* output, int src_len, int des_len); |
| 17 | |
| 18 | void put_byte(char* buff, int* offset, const char input); |
| 19 | void put_short(char* buff, int* offset, const short input); |
| 20 | void put_int(char* buff, int* offset, const int input); |
| 21 | void put_long(char* buff, int* offset, const long long input); |
| 22 | void put_float(char* buff, int* offset, const float input); |
| 23 | void put_double(char* buff, int* offset, const double input); |
| 24 | void put_string(char* buff, int* offset, const char* input); |
| 25 | void put_binary(char* buff, int* offset, const char* input, int len); |
| 26 | |
| 27 | #ifdef __cplusplus |
| 28 | } |
| 29 | #endif |
| 30 | |
| 31 | #endif |
| 32 | |