summaryrefslogtreecommitdiffstats
path: root/lib/protocol.h
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-09 13:22:35 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-28 13:19:02 +0300
commitd61cc219f6bd3c4ffc96239893a8ded9b5a83b30 (patch)
tree4ac3c1b1ed0ede9b347e27b262f939213146a221 /lib/protocol.h
parenta2a3f6912e60c7932bad87a6d2249f0e83e637e1 (diff)
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 <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/protocol.h')
-rw-r--r--lib/protocol.h19
1 files changed, 11 insertions, 8 deletions
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 <spa/pod/pod.h>
-
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
#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(