2025-06-27 21:53:40 +01:00
|
|
|
#ifndef _SERIAL_SERIAL_H_
|
|
|
|
|
#define _SERIAL_SERIAL_H_
|
|
|
|
|
|
2025-10-19 21:01:27 +01:00
|
|
|
#include <blue/core/object.h>
|
2025-10-24 12:45:43 +01:00
|
|
|
#include <blue/core/stream.h>
|
2025-06-27 21:53:40 +01:00
|
|
|
#include <blue/serial.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
struct b_serial_ctx {
|
2025-10-24 12:45:43 +01:00
|
|
|
b_stream_buffer *ctx_streambuf;
|
2025-06-27 21:53:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct b_serial_format_ops {
|
|
|
|
|
enum b_status (*fmt_serialise)(
|
2025-10-24 12:45:43 +01:00
|
|
|
struct b_serial_ctx *, b_object *, b_stream *, enum b_serial_flags);
|
2025-06-27 21:53:40 +01:00
|
|
|
enum b_status (*fmt_deserialise)(
|
2025-10-24 12:45:43 +01:00
|
|
|
struct b_serial_ctx *, b_stream *, b_object **,
|
2025-06-27 21:53:40 +01:00
|
|
|
enum b_serial_flags);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|