#ifndef EXTEN_HEADER_PLUGIN_H
#define EXTEN_HEADER_PLUGIN_H

#ifdef __cplusplus
extern "C" {
#endif
#if 0
}
#endif

struct xh_context;

int __xh_version(void);
size_t __xh_get_header_size(void);
size_t __xh_get_reader_size(void);
int __xh_header2navdata(struct xh_navdata * nav, uint8_t* buf);
int __xh_header2text(char * text, uint8_t* buf, size_t len);

struct xh_context * __xh_init(void);
void __xh_release(struct xh_context * hdl);

struct xh_monitor * __xh_monitor_start(struct xh_context * hdl);
int __xh_monitor_stop(struct xh_context * hdl, struct xh_monitor * mtr);

volatile struct xh_reader *
__xh_register_reader(struct xh_context * hdl,
                     volatile uint8_t * buf, size_t max_len);
int __xh_unregister_reader(struct xh_context * hdl,
                           volatile struct xh_reader * rdr);
int __xh_get_header(volatile struct xh_reader * rdr, uint8_t * buffer);

int __xh_get_navdata(volatile struct xh_reader * rdr, struct xh_navdata * nav);
#if 0
{
#endif
#ifdef __cplusplus
}
#endif

#endif /* EXTEN_HEADER_PLUGIN_H */
