Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DBALLE_RAWMSG_H
00023 #define DBALLE_RAWMSG_H
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00034 #include <dballe/core/error.h>
00035
00039 typedef enum {
00040 BUFR = 0,
00041 CREX = 1,
00042 AOF = 2
00043 } dba_encoding;
00044
00054 const char* dba_encoding_name(dba_encoding enc);
00055
00056 struct _dba_file;
00057
00061 struct _dba_rawmsg {
00067 struct _dba_file* file;
00069 int offset;
00071 int index;
00072
00074 unsigned char* buf;
00076 int len;
00078 int alloclen;
00079
00081 dba_encoding encoding;
00082 };
00084 typedef struct _dba_rawmsg* dba_rawmsg;
00085
00095 dba_err dba_rawmsg_create(dba_rawmsg* msg);
00096
00105 void dba_rawmsg_delete(dba_rawmsg msg);
00106
00113 void dba_rawmsg_reset(dba_rawmsg msg);
00114
00118 dba_err dba_rawmsg_acquire_buf(dba_rawmsg msg, unsigned char* buf, int size);
00119
00133 dba_err dba_rawmsg_get_raw(dba_rawmsg msg, const unsigned char** buf, int* size);
00134
00147 dba_err dba_rawmsg_expand_buffer(dba_rawmsg msg);
00148
00163 dba_err dba_rawmsg_copy(dba_rawmsg* dst, dba_rawmsg src);
00164
00165 #ifdef __cplusplus
00166 }
00167 #endif
00168
00169
00170 #endif