JULEA
Loading...
Searching...
No Matches
jitem.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_ITEM_H
24#define JULEA_ITEM_ITEM_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#include <julea.h>
33
34G_BEGIN_DECLS
35
44struct JItem;
45
46typedef struct JItem JItem;
47
48G_END_DECLS
49
50#include <item/jcollection.h>
51
52G_BEGIN_DECLS
53
67JItem* j_item_ref(JItem* item);
68
78void j_item_unref(JItem* item);
79
80G_DEFINE_AUTOPTR_CLEANUP_FUNC(JItem, j_item_unref)
81
82
92gchar const* j_item_get_name(JItem* item);
93
106JCredentials* j_item_get_credentials(JItem* item);
107
122
132void j_item_delete(JItem* item, JBatch* batch);
133
145void j_item_get(JCollection* collection, JItem** item, gchar const* name, JBatch* batch);
146
160void j_item_read(JItem* item, gpointer data, guint64 length, guint64 offset, guint64* bytes_read, JBatch* batch);
161
178void j_item_write(JItem* item, gconstpointer data, guint64 length, guint64 offset, guint64* bytes_written, JBatch* batch);
179
189void j_item_get_status(JItem* item, JBatch* batch);
190
201guint64 j_item_get_size(JItem* item);
202
214
219G_END_DECLS
220
221#endif
JItem * j_item_create(JCollection *collection, gchar const *name, JDistribution *distribution, JBatch *batch)
Definition jitem.c:163
gchar const * j_item_get_name(JItem *item)
Definition jitem.c:153
gint64 j_item_get_modification_time(JItem *item)
Definition jitem.c:292
guint64 j_item_get_size(JItem *item)
Definition jitem.c:282
void j_item_write(JItem *item, gconstpointer data, guint64 length, guint64 offset, guint64 *bytes_written, JBatch *batch)
Definition jitem.c:257
void j_item_read(JItem *item, gpointer data, guint64 length, guint64 offset, guint64 *bytes_read, JBatch *batch)
Definition jitem.c:245
void j_item_delete(JItem *item, JBatch *batch)
Definition jitem.c:233
void j_item_get(JCollection *collection, JItem **item, gchar const *name, JBatch *batch)
Definition jitem.c:211
void j_item_get_status(JItem *item, JBatch *batch)
Definition jitem.c:271
G_END_DECLS G_BEGIN_DECLS JItem * j_item_ref(JItem *item)
Definition jitem.c:108
void j_item_unref(JItem *item)
Definition jitem.c:120
Definition jbatch.c:49
Definition jcollection.c:48
Definition jcredentials.c:45
Definition jdistribution.c:48
Definition jitem.c:59
JCollection * collection
Definition jitem.c:99
gchar * name
Definition jitem.c:68
JDistribution * distribution
Definition jitem.c:71