#ifndef TINY_CONVMEM_MCP_TOOLS_MEMORY_INDEX_H #define TINY_CONVMEM_MCP_TOOLS_MEMORY_INDEX_H #include "storage/store.h" typedef struct tiny_relation_reference { size_t source_index; tiny_relation_type_t type; } tiny_relation_reference_t; typedef struct tiny_memory_index tiny_memory_index_t; tiny_memory_index_t *tiny_memory_index_build(const tiny_store_t *store); void tiny_memory_index_free(tiny_memory_index_t *index); bool tiny_memory_index_find(const tiny_memory_index_t *index, const char *message_id, size_t *entry_index); bool tiny_memory_index_incoming(const tiny_memory_index_t *index, const char *message_id, const tiny_relation_reference_t **references, size_t *count); uint64_t tiny_memory_index_memory_estimate(const tiny_memory_index_t *index); #endif