omap-iter-impl.h 872 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * (C) 2017 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */
#ifndef __MOBJECT_OMAP_ITER_H
#define __MOBJECT_OMAP_ITER_H

#include "libmobject-store.h"

typedef struct omap_iter_node* omap_iter_node_t;

struct omap_iter_node {
	char*            key;
	char*            value;
16
	size_t           key_size;
17
18
19
20
21
	size_t           value_size;
	omap_iter_node_t prev, next; 
};

struct mobject_store_omap_iter {
22
	size_t           num_items;
23
	size_t           ref_count;
24
25
26
27
28
29
	omap_iter_node_t head;
	omap_iter_node_t current;
};

void omap_iter_create(mobject_store_omap_iter_t* iter);

30
31
void omap_iter_incr_ref(mobject_store_omap_iter_t iter);

32
33
34
35
36
37
38
void omap_iter_free(mobject_store_omap_iter_t iter);

void omap_iter_append(mobject_store_omap_iter_t iter, 
                      const char* key, const char* val, 
                      size_t val_size);

#endif