mirror of
https://github.com/simon987/sist2.git
synced 2025-12-12 15:08:53 +00:00
27 lines
714 B
C
27 lines
714 B
C
#ifndef SIST2_SERIALIZE_H
|
|
#define SIST2_SERIALIZE_H
|
|
|
|
#include "src/sist.h"
|
|
#include <sys/syscall.h>
|
|
|
|
typedef void(*index_func)(cJSON *, const char[UUID_STR_LEN]);
|
|
|
|
void incremental_copy(store_t *store, store_t *dst_store, const char *filepath,
|
|
const char *dst_filepath, GHashTable *copy_table);
|
|
|
|
void write_document(document_t *doc);
|
|
|
|
void read_index(const char *path, const char[UUID_STR_LEN], const char *type, index_func);
|
|
|
|
void incremental_read(GHashTable *table, const char *filepath);
|
|
|
|
/**
|
|
* Must be called after write_document
|
|
*/
|
|
void thread_cleanup();
|
|
|
|
void write_index_descriptor(char *path, index_descriptor_t *desc);
|
|
|
|
index_descriptor_t read_index_descriptor(char *path);
|
|
|
|
#endif |