#ifndef __ZVFS_IO_ENGINE_H__
#define __ZVFS_IO_ENGINE_H__

#include <stdint.h>
#include <stddef.h>

int io_engine_init(void);

int blob_create(uint64_t size_hint, uint64_t *blob_id_out, uint64_t *handle_id_out);
int blob_open(uint64_t blob_id, uint64_t *handle_id_out);
int blob_write_ex(uint64_t handle_id, uint64_t offset, const void *buf, size_t len, uint32_t write_flags);
int blob_write(uint64_t handle_id, uint64_t offset, const void *buf, size_t len);
int blob_read(uint64_t handle_id, uint64_t offset, void *buf, size_t len);
int blob_resize(uint64_t handle_id, uint64_t new_size);
int blob_sync_md(uint64_t handle_id);
int blob_close(uint64_t handle_id);
int blob_delete(uint64_t blob_id);
int blob_add_ref(uint64_t handle_id, uint32_t ref_delta);
int blob_add_ref_batch(const uint64_t *handle_ids, const uint32_t *ref_deltas, uint32_t count);

#endif // __ZVFS_IO_ENGINE_H__
