JULEA
Loading...
Searching...
No Matches
jkv-iterator.h
Go to the documentation of this file.
1/*
2 * JULEA - Flexible storage framework
3 * Copyright (C) 2017-2024 Michael Kuhn
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
23#ifndef JULEA_KV_KV_ITERATOR_H
24#define JULEA_KV_KV_ITERATOR_H
25
26#if !defined(JULEA_KV_H) && !defined(JULEA_KV_COMPILATION)
27#error "Only <julea-kv.h> can be included directly."
28#endif
29
30#include <glib.h>
31
32G_BEGIN_DECLS
33
42struct JKVIterator;
43
44typedef struct JKVIterator JKVIterator;
45
46G_END_DECLS
47
48#include <kv/jkv.h>
49
50G_BEGIN_DECLS
51
60JKVIterator* j_kv_iterator_new(gchar const* namespace, gchar const* prefix);
61
71JKVIterator* j_kv_iterator_new_for_index(guint32 index, gchar const* namespace, gchar const* prefix);
72
78void j_kv_iterator_free(JKVIterator* iterator);
79
80G_DEFINE_AUTOPTR_CLEANUP_FUNC(JKVIterator, j_kv_iterator_free)
81
82
92gboolean j_kv_iterator_next(JKVIterator* iterator);
93
106gchar const* j_kv_iterator_get(JKVIterator* iterator, gconstpointer* value, guint32* len);
107
112G_END_DECLS
113
114#endif
JKVIterator * j_kv_iterator_new_for_index(guint32 index, gchar const *namespace, gchar const *prefix)
Definition jkv-iterator.c:156
void j_kv_iterator_free(JKVIterator *iterator)
Definition jkv-iterator.c:201
gboolean j_kv_iterator_next(JKVIterator *iterator)
Definition jkv-iterator.c:229
gchar const * j_kv_iterator_get(JKVIterator *iterator, gconstpointer *value, guint32 *len)
Definition jkv-iterator.c:265
G_END_DECLS G_BEGIN_DECLS JKVIterator * j_kv_iterator_new(gchar const *namespace, gchar const *prefix)
Definition jkv-iterator.c:109
Definition jkv-iterator.c:38
guint32 len
Definition jkv-iterator.c:55
gconstpointer value
Definition jkv-iterator.c:54