meta: rename serial module to fx.serial namespace
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#ifndef FX_SERIAL_H_
|
||||
#define FX_SERIAL_H_
|
||||
|
||||
#include <fx/serial/bitcode.h>
|
||||
#include <fx/serial/ctx.h>
|
||||
#include <fx/serial/toml.h>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef FX_SERIAL_BITCODE_H_
|
||||
#define FX_SERIAL_BITCODE_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
#define FX_TYPE_BITCODE_SERIAL_CTX (fx_bitcode_serial_ctx_get_type())
|
||||
|
||||
FX_DECLARE_TYPE(fx_bitcode_serial_ctx);
|
||||
|
||||
FX_TYPE_CLASS_DECLARATION_BEGIN(fx_bitcode_serial_ctx)
|
||||
FX_TYPE_CLASS_DECLARATION_END(fx_bitcode_serial_ctx)
|
||||
|
||||
FX_API fx_type fx_bitcode_serial_ctx_get_type(void);
|
||||
|
||||
FX_TYPE_DEFAULT_CONSTRUCTOR(fx_bitcode_serial_ctx, FX_TYPE_BITCODE_SERIAL_CTX);
|
||||
|
||||
FX_DECLS_END;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
#ifndef FX_SERIAL_CTX_H_
|
||||
#define FX_SERIAL_CTX_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/misc.h>
|
||||
#include <fx/core/object.h>
|
||||
#include <fx/core/status.h>
|
||||
#include <fx/core/stream.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
#define FX_TYPE_SERIAL_CTX (fx_serial_ctx_get_type())
|
||||
|
||||
typedef enum fx_serial_flags {
|
||||
FX_SERIAL_F_NONE = 0,
|
||||
FX_SERIAL_F_PRETTY = 0x01u,
|
||||
} fx_serial_flags;
|
||||
|
||||
FX_DECLARE_TYPE(fx_serial_ctx);
|
||||
|
||||
FX_TYPE_CLASS_DECLARATION_BEGIN(fx_serial_ctx)
|
||||
fx_result (*s_serialise)(
|
||||
fx_serial_ctx *,
|
||||
fx_object *,
|
||||
fx_stream *,
|
||||
fx_serial_flags);
|
||||
fx_result (*s_deserialise)(
|
||||
fx_serial_ctx *,
|
||||
fx_stream *,
|
||||
fx_object **,
|
||||
fx_serial_flags);
|
||||
FX_TYPE_CLASS_DECLARATION_END(fx_serial_ctx)
|
||||
|
||||
typedef struct fx_serial_ctx_data {
|
||||
fx_stream_buffer *ctx_streambuf;
|
||||
} fx_serial_ctx_data;
|
||||
|
||||
FX_API fx_type fx_serial_ctx_get_type(void);
|
||||
|
||||
FX_API fx_result fx_serial_ctx_serialise(
|
||||
fx_serial_ctx *ctx,
|
||||
fx_object *src,
|
||||
fx_stream *dest,
|
||||
fx_serial_flags flags);
|
||||
|
||||
FX_API fx_result fx_serial_ctx_deserialise(
|
||||
fx_serial_ctx *ctx,
|
||||
fx_stream *src,
|
||||
fx_object **dest,
|
||||
fx_serial_flags flags);
|
||||
|
||||
FX_DECLS_END;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef FX_SERIAL_TOML_H_
|
||||
#define FX_SERIAL_TOML_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
#define FX_TYPE_TOML_SERIAL_CTX (fx_toml_serial_ctx_get_type())
|
||||
|
||||
FX_DECLARE_TYPE(fx_toml_serial_ctx);
|
||||
|
||||
FX_TYPE_CLASS_DECLARATION_BEGIN(fx_toml_serial_ctx)
|
||||
FX_TYPE_CLASS_DECLARATION_END(fx_toml_serial_ctx)
|
||||
|
||||
FX_API fx_type fx_toml_serial_ctx_get_type(void);
|
||||
|
||||
FX_TYPE_DEFAULT_CONSTRUCTOR(fx_toml_serial_ctx, FX_TYPE_TOML_SERIAL_CTX);
|
||||
|
||||
FX_DECLS_END;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user