JULEA
jkv-uri.h
Go to the documentation of this file.
1 /*
2  * JULEA - Flexible storage framework
3  * Copyright (C) 2010-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_URI_H
24 #define JULEA_KV_KV_URI_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 
32 G_BEGIN_DECLS
33 
41 {
42  // kv://index/namespace
44  // kv://index/namespace/key
46 };
47 
48 typedef enum JKVURIScheme JKVURIScheme;
49 
50 struct JKVURI;
51 
52 typedef struct JKVURI JKVURI;
53 
54 G_END_DECLS
55 
56 #include <kv/jkv.h>
57 
58 G_BEGIN_DECLS
59 
74 JKVURI* j_kv_uri_new(gchar const* uri_, JKVURIScheme scheme);
75 
89 void j_kv_uri_free(JKVURI* uri);
90 
91 G_DEFINE_AUTOPTR_CLEANUP_FUNC(JKVURI, j_kv_uri_free)
92 
93 
108 guint32 j_kv_uri_get_index(JKVURI* uri);
109 
125 gchar const* j_kv_uri_get_namespace(JKVURI* uri);
126 
142 gchar const* j_kv_uri_get_name(JKVURI* uri);
143 
159 JKV* j_kv_uri_get_kv(JKVURI* uri);
160 
165 G_END_DECLS
166 
167 #endif
gchar const * j_kv_uri_get_namespace(JKVURI *uri)
Definition: jkv-uri.c:230
JKVURIScheme
Definition: jkv-uri.h:41
JKV * j_kv_uri_get_kv(JKVURI *uri)
Definition: jkv-uri.c:250
guint32 j_kv_uri_get_index(JKVURI *uri)
Definition: jkv-uri.c:220
gchar const * j_kv_uri_get_name(JKVURI *uri)
Definition: jkv-uri.c:240
G_END_DECLS G_BEGIN_DECLS JKVURI * j_kv_uri_new(gchar const *uri_, JKVURIScheme scheme)
Definition: jkv-uri.c:177
void j_kv_uri_free(JKVURI *uri)
Definition: jkv-uri.c:202
@ J_KV_URI_SCHEME_KV
Definition: jkv-uri.h:45
@ J_KV_URI_SCHEME_NAMESPACE
Definition: jkv-uri.h:43
Definition: jkv-uri.c:43
JKVURIScheme scheme
Definition: jkv-uri.c:44
Definition: jkv.c:69