JULEA
juri.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_ITEM_URI_H
24 #define JULEA_ITEM_URI_H
25 
26 #if !defined(JULEA_ITEM_H) && !defined(JULEA_ITEM_COMPILATION)
27 #error "Only <julea-item.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 G_BEGIN_DECLS
33 
43 #define J_URI_ERROR j_uri_error_quark()
44 
48 typedef enum
49 {
57 
58 struct JURI;
59 
63 typedef struct JURI JURI;
64 
65 G_END_DECLS
66 
67 #include <item/jcollection.h>
68 #include <item/jitem.h>
69 
70 G_BEGIN_DECLS
71 
77 GQuark j_uri_error_quark(void);
78 
92 JURI* j_uri_new(gchar const* uri_);
93 
107 void j_uri_free(JURI* uri);
108 
109 G_DEFINE_AUTOPTR_CLEANUP_FUNC(JURI, j_uri_free)
110 
111 
126 gchar const* j_uri_get_collection_name(JURI* uri);
127 
143 gchar const* j_uri_get_item_name(JURI* uri);
144 
162 gboolean j_uri_get(JURI* uri, GError** error);
163 
182 gboolean j_uri_create(JURI* uri, gboolean with_parents, GError** error);
183 
201 gboolean j_uri_delete(JURI* uri, GError** error);
202 
220 
237 JItem* j_uri_get_item(JURI* uri);
238 
243 G_END_DECLS
244 
245 #endif
JCollection * j_uri_get_collection(JURI *uri)
Definition: juri.c:380
gchar const * j_uri_get_item_name(JURI *uri)
Definition: juri.c:215
JURIError
Definition: juri.h:49
G_END_DECLS G_BEGIN_DECLS GQuark j_uri_error_quark(void)
Definition: juri.c:157
gboolean j_uri_get(JURI *uri, GError **error)
Definition: juri.c:223
void j_uri_free(JURI *uri)
Definition: juri.c:186
gboolean j_uri_create(JURI *uri, gboolean with_parents, GError **error)
Definition: juri.c:288
gboolean j_uri_delete(JURI *uri, GError **error)
Definition: juri.c:345
JItem * j_uri_get_item(JURI *uri)
Definition: juri.c:388
JURI * j_uri_new(gchar const *uri_)
Definition: juri.c:163
gchar const * j_uri_get_collection_name(JURI *uri)
Definition: juri.c:207
@ J_URI_ERROR_COLLECTION_EXISTS
Definition: juri.h:54
@ J_URI_ERROR_STORE_NOT_FOUND
Definition: juri.h:50
@ J_URI_ERROR_COLLECTION_NOT_FOUND
Definition: juri.h:51
@ J_URI_ERROR_ITEM_EXISTS
Definition: juri.h:55
@ J_URI_ERROR_ITEM_NOT_FOUND
Definition: juri.h:52
@ J_URI_ERROR_STORE_EXISTS
Definition: juri.h:53
Definition: jcollection.c:48
Definition: jitem.c:59
Definition: juri.c:46