diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-10 21:57:04 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-10 21:57:04 +0200 |
commit | 96399ca27c075339791a088feb80e03f9f3587d1 (patch) | |
tree | ffad2ffb2b2ac2228b0a8b805192bcbc4457e3c0 /src/ramps.h | |
parent | m (diff) | |
download | coopgammad-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 '')
-rw-r--r-- | src/ramps.h | 24 |
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); + |