aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/stream.h')
-rw-r--r--include/salticidae/stream.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/salticidae/stream.h b/include/salticidae/stream.h
index 3f768b3..95c2ccb 100644
--- a/include/salticidae/stream.h
+++ b/include/salticidae/stream.h
@@ -494,6 +494,8 @@ extern "C" {
uint256_t *uint256_new();
uint256_t *uint256_new_from_bytes(const uint8_t *arr);
+void uint256_free(const uint256_t *self);
+
bool uint256_is_null(const uint256_t *self);
bool uint256_is_eq(const uint256_t *a, const uint256_t *b);
void uint256_serialize(const uint256_t *self, datastream_t *s);
@@ -501,30 +503,39 @@ void uint256_unserialize(uint256_t *self, datastream_t *s);
datastream_t *datastream_new();
datastream_t *datastream_new_from_bytes(const uint8_t *begin, const uint8_t *end);
+void datastream_free(const datastream_t *self);
+
void datastream_assign_by_copy(datastream_t *dst, const datastream_t *src);
void datastream_assign_by_move(datastream_t *dst, datastream_t *src);
uint8_t *datastream_data(datastream_t *self);
void datastream_clear(datastream_t *self);
size_t datastream_size(const datastream_t *self);
+
void datastream_put_u8(datastream_t *self, uint8_t val);
void datastream_put_u16(datastream_t *self, uint16_t val);
void datastream_put_u32(datastream_t *self, uint32_t val);
+void datastream_put_u64(datastream_t *self, uint64_t val);
+
void datastream_put_i8(datastream_t *self, int8_t val);
void datastream_put_i16(datastream_t *self, int16_t val);
void datastream_put_i32(datastream_t *self, int32_t val);
+void datastream_put_i64(datastream_t *self, int64_t val);
void datastream_put_data(datastream_t *self,
const uint8_t *begin, const uint8_t *end);
uint8_t datastream_get_u8(datastream_t *self);
uint16_t datastream_get_u16(datastream_t *self);
uint32_t datastream_get_u32(datastream_t *self);
+uint64_t datastream_get_u64(datastream_t *self);
+
int8_t datastream_get_i8(datastream_t *self);
int16_t datastream_get_i16(datastream_t *self);
int32_t datastream_get_i32(datastream_t *self);
+int64_t datastream_get_i64(datastream_t *self);
+
const uint8_t *datastream_get_data_inplace(datastream_t *self, size_t len);
uint256_t *datastream_get_hash(const datastream_t *self);
-void datastream_free(const datastream_t *self);
-bytearray_t *datastream_to_bytearray(datastream_t *self);
+bytearray_t *datastream_to_bytearray(datastream_t *_moved_self);
#ifdef __cplusplus
}