aboutsummaryrefslogtreecommitdiffstats
path: root/src/ramps.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-10 21:57:04 +0200
committerMattias Andrée <maandree@kth.se>2016-07-10 21:57:04 +0200
commit96399ca27c075339791a088feb80e03f9f3587d1 (patch)
treeffad2ffb2b2ac2228b0a8b805192bcbc4457e3c0 /src/ramps.h
parentm (diff)
downloadcoopgammad-96399ca27c075339791a088feb80e03f9f3587d1.tar.gz
coopgammad-96399ca27c075339791a088feb80e03f9f3587d1.tar.bz2
coopgammad-96399ca27c075339791a088feb80e03f9f3587d1.tar.xz
Work on marshalling
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/ramps.h')
-rw-r--r--src/ramps.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ramps.h b/src/ramps.h
index 0f1462c..7aa08fd 100644
--- a/src/ramps.h
+++ b/src/ramps.h
@@ -56,3 +56,27 @@ union gamma_ramps
libgamma_gamma_rampsd_t d;
};
+
+
+/**
+ * Marshal a ramp trio
+ *
+ * @param this The ramps
+ * @param buf Output buffer for the marshalled ramps,
+ * `NULL` just measure how large the buffers
+ * needs to be
+ * @param ramps_size The byte-size of ramps
+ * @return The number of marshalled byte
+ */
+size_t gamma_ramps_marshal(const union gamma_ramps* this, char* buf, size_t ramps_size);
+
+/**
+ * Unmarshal a ramp trio
+ *
+ * @param this Output for the ramps
+ * @param buf Buffer with the marshalled ramps
+ * @param ramps_size The byte-size of ramps
+ * @return The number of unmarshalled bytes, 0 on error
+ */
+size_t gamma_ramps_unmarshal(union gamma_ramps* this, const char* buf, size_t ramps_size);
+