0.0.002
ddat interop with dat js cable interop with cabal js ddat's frontend = dat-thang cable fe = cable-thang dillo support based on cel's dillo-dat bootstrap node xplatform support Signed-off-by: divo <418@cryspace.space>
This commit is contained in:
1 parent
f0f91540be
commit
b735900f2e
323 files changed
+134347
-343
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#ifndef SLEEP_PROTO_H
|
||||
#define SLEEP_PROTO_H
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#define SLEEP_PROTO_KEY_BYTES 32u
|
||||
typedef struct sleep_metadata_header { char type[32]; uint8_t content[32]; size_t content_len; } sleep_metadata_header_t;
|
||||
enum sleep_entry_type { SLEEP_ENTRY_FILE=1, SLEEP_ENTRY_DIRECTORY=2, SLEEP_ENTRY_SYMLINK=3, SLEEP_ENTRY_DELETE=4 };
|
||||
typedef struct sleep_metadata_entry {
|
||||
char path[1024];
|
||||
uint32_t type;
|
||||
uint32_t mode;
|
||||
uint64_t size;
|
||||
uint64_t mtime;
|
||||
uint64_t block_offset;
|
||||
uint64_t block_count;
|
||||
char linkname[1024];
|
||||
} sleep_metadata_entry_t;
|
||||
size_t sleep_varint_size(uint64_t value);
|
||||
int sleep_varint_encode(uint64_t value, uint8_t *out, size_t capacity, size_t *written);
|
||||
int sleep_varint_decode(const uint8_t *input, size_t input_len, uint64_t *value, size_t *consumed);
|
||||
int sleep_metadata_header_encode(const sleep_metadata_header_t *header, uint8_t *out, size_t capacity, size_t *written);
|
||||
int sleep_metadata_header_decode(sleep_metadata_header_t *header, const uint8_t *input, size_t input_len);
|
||||
int sleep_write_metadata_header(const char *path, const uint8_t content_pubkey[32]);
|
||||
int sleep_metadata_entry_encode(const sleep_metadata_entry_t *entry, uint8_t *out, size_t capacity, size_t *written);
|
||||
int sleep_metadata_entry_decode(sleep_metadata_entry_t *entry, const uint8_t *input, size_t input_len);
|
||||
#endif
|
||||
Reference in new issue
Block a user