iostream-rawlog-private.h revision 76a58bc863893374000881e69d6dd4e3dccaddde
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294Timo Sirainen#ifndef IOSTREAM_RAWLOG_PRIVATE_H
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen#define IOSTREAM_RAWLOG_PRIVATE_H
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen#include "iostream-rawlog.h"
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen#define IOSTREAM_RAWLOG_MAX_PREFIX_LEN 3
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenstruct rawlog_iostream {
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen struct iostream_private *iostream;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen enum iostream_rawlog_flags flags;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen struct ostream *rawlog_output;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen buffer_t *buffer;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen bool input;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen bool line_continued;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen};
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenvoid iostream_rawlog_init(struct rawlog_iostream *rstream,
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen enum iostream_rawlog_flags flags, bool input);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenvoid iostream_rawlog_write(struct rawlog_iostream *rstream,
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen const unsigned char *data, size_t size);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenvoid iostream_rawlog_close(struct rawlog_iostream *rstream);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen#endif
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen