JULEA
jobject.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_OBJECT_OBJECT_H
24 #define JULEA_OBJECT_OBJECT_H
25 
26 #if !defined(JULEA_OBJECT_H) && !defined(JULEA_OBJECT_COMPILATION)
27 #error "Only <julea-object.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 #include <julea.h>
33 
34 G_BEGIN_DECLS
35 
44 struct JObject;
45 
46 typedef struct JObject JObject;
47 
62 JObject* j_object_new(gchar const* namespace, gchar const* name);
63 
79 JObject* j_object_new_for_index(guint32 index, gchar const* namespace, gchar const* name);
80 
94 JObject* j_object_ref(JObject* object);
95 
105 void j_object_unref(JObject* object);
106 
107 G_DEFINE_AUTOPTR_CLEANUP_FUNC(JObject, j_object_unref)
108 
109 
119 void j_object_create(JObject* object, JBatch* batch);
120 
130 void j_object_delete(JObject* object, JBatch* batch);
131 
145 void j_object_read(JObject* object, gpointer data, guint64 length, guint64 offset, guint64* bytes_read, JBatch* batch);
146 
163 void j_object_write(JObject* object, gconstpointer data, guint64 length, guint64 offset, guint64* bytes_written, JBatch* batch);
164 
176 void j_object_status(JObject* object, gint64* modification_time, guint64* size, JBatch* batch);
177 
187 void j_object_sync(JObject* object, JBatch* batch);
188 
193 G_END_DECLS
194 
195 #endif
void j_object_create(JObject *object, JBatch *batch)
Definition: jobject.c:1024
void j_object_sync(JObject *object, JBatch *batch)
Definition: jobject.c:1177
void j_object_unref(JObject *object)
Definition: jobject.c:1008
JObject * j_object_new_for_index(guint32 index, gchar const *namespace, gchar const *name)
Definition: jobject.c:975
void j_object_delete(JObject *object, JBatch *batch)
Definition: jobject.c:1043
JObject * j_object_new(gchar const *namespace, gchar const *name)
Definition: jobject.c:955
JObject * j_object_ref(JObject *object)
Definition: jobject.c:996
void j_object_read(JObject *object, gpointer data, guint64 length, guint64 offset, guint64 *bytes_read, JBatch *batch)
Definition: jobject.c:1061
void j_object_status(JObject *object, gint64 *modification_time, guint64 *size, JBatch *batch)
Definition: jobject.c:1153
void j_object_write(JObject *object, gconstpointer data, guint64 length, guint64 offset, guint64 *bytes_written, JBatch *batch)
Definition: jobject.c:1107
Definition: jbatch.c:49
Definition: jobject.c:82
guint32 index
Definition: jobject.c:86
gchar * name
Definition: jobject.c:91