From d61cc219f6bd3c4ffc96239893a8ded9b5a83b30 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 9 Jul 2021 13:22:35 +0300 Subject: lib: remove dependency on spa_pod and spa in general Replace spa_pod with a custom icipc_data structure, which is based on spa_pod and it's fully compatible with it Signed-off-by: George Kiagiadakis --- lib/protocol.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/protocol.h') diff --git a/lib/protocol.h b/lib/protocol.h index 34a92a0..821edf2 100644 --- a/lib/protocol.h +++ b/lib/protocol.h @@ -9,39 +9,42 @@ #ifndef __ICIPC_PROTOCOL_H__ #define __ICIPC_PROTOCOL_H__ -#include - +#include +#include +#include #include "defs.h" #ifdef __cplusplus extern "C" { #endif +struct icipc_data; + /* request */ ICIPC_API size_t icipc_protocol_calculate_request_size( const char *name, - const struct spa_pod *args); + const struct icipc_data *args); ICIPC_API void icipc_protocol_build_request( uint8_t *buffer, size_t size, const char *name, - const struct spa_pod *args); + const struct icipc_data *args); ICIPC_API bool icipc_protocol_parse_request( const uint8_t *buffer, size_t size, const char **name, - const struct spa_pod **args); + const struct icipc_data **args); /* reply */ ICIPC_API -size_t icipc_protocol_calculate_reply_ok_size(const struct spa_pod *value); +size_t icipc_protocol_calculate_reply_ok_size(const struct icipc_data *value); ICIPC_API size_t icipc_protocol_calculate_reply_error_size(const char *msg); @@ -50,7 +53,7 @@ ICIPC_API void icipc_protocol_build_reply_ok( uint8_t *buffer, size_t size, - const struct spa_pod *value); + const struct icipc_data *value); ICIPC_API void icipc_protocol_build_reply_error( @@ -68,7 +71,7 @@ ICIPC_API bool icipc_protocol_parse_reply_ok( const uint8_t *buffer, size_t size, - const struct spa_pod **value); + const struct icipc_data **value); ICIPC_API bool icipc_protocol_parse_reply_error( -- cgit 1.2.3-korg