1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen uidlist file:
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen struct uidlist_header;
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen // size includes both prev_offset and uidlist
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen packed (size << 2) | packed_flags; // UIDLIST_PACKED_FLAG_*
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen [packed prev_offset;] // If UIDLIST_PACKED_FLAG_BEGINS_WITH_OFFSET is set
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen if (UIDLIST_PACKED_FLAG_BITMASK) {
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen packed base_uid; // first UID in uidlist
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen uint8_t bitmask[]; // first bit is base_uid+1
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen // FIXME: packed range
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenstruct squat_uidlist *squat_uidlist_init(struct squat_trie *trie);
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenvoid squat_uidlist_deinit(struct squat_uidlist *uidlist);
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenint squat_uidlist_refresh(struct squat_uidlist *uidlist);
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenint squat_uidlist_build_init(struct squat_uidlist *uidlist,
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenuint32_t squat_uidlist_build_add_uid(struct squat_uidlist_build_context *ctx,
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenvoid squat_uidlist_build_flush(struct squat_uidlist_build_context *ctx);
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenint squat_uidlist_build_finish(struct squat_uidlist_build_context *ctx);
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenvoid squat_uidlist_build_deinit(struct squat_uidlist_build_context **ctx);
5889b12a55df32b93428b7fb52c06cfd749bee07Timo Sirainenint squat_uidlist_rebuild_init(struct squat_uidlist_build_context *build_ctx,
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainen struct squat_uidlist_rebuild_context **ctx_r);
1caf757864e7734345660e7d190f84e42668a6f8Timo Sirainenuint32_t squat_uidlist_rebuild_next(struct squat_uidlist_rebuild_context *ctx,
1caf757864e7734345660e7d190f84e42668a6f8Timo Sirainenuint32_t squat_uidlist_rebuild_nextu(struct squat_uidlist_rebuild_context *ctx,
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenint squat_uidlist_rebuild_finish(struct squat_uidlist_rebuild_context *ctx,
74ab5ea66c0c4b388f1c774ae6a47ab94f1b4f18Timo Sirainenint squat_uidlist_get(struct squat_uidlist *uidlist, uint32_t uid_list_idx,
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenuint32_t squat_uidlist_singleton_last_uid(uint32_t uid_list_idx);
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenint squat_uidlist_get_seqrange(struct squat_uidlist *uidlist,
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenint squat_uidlist_filter(struct squat_uidlist *uidlist, uint32_t uid_list_idx,
1b0cfbf3cc77a670b92fff5c30f7b1eb17a63ab1Timo Sirainenvoid squat_uidlist_delete(struct squat_uidlist *uidlist);
74ab5ea66c0c4b388f1c774ae6a47ab94f1b4f18Timo Sirainensize_t squat_uidlist_mem_used(struct squat_uidlist *uidlist,
74ab5ea66c0c4b388f1c774ae6a47ab94f1b4f18Timo Sirainen unsigned int *count_r);