|
G_GNUC_INTERNAL void | j_item_set_modification_time (JItem *item, gint64 modification_time) |
|
G_GNUC_INTERNAL void | j_item_set_size (JItem *item, guint64 size) |
|
G_END_DECLS G_BEGIN_DECLS JItem * | j_item_ref (JItem *item) |
|
void | j_item_unref (JItem *item) |
|
gchar const * | j_item_get_name (JItem *item) |
|
JItem * | j_item_create (JCollection *collection, gchar const *name, JDistribution *distribution, JBatch *batch) |
|
void | j_item_delete (JItem *item, JBatch *batch) |
|
void | j_item_get (JCollection *collection, JItem **item, gchar const *name, JBatch *batch) |
|
void | j_item_read (JItem *item, gpointer data, guint64 length, guint64 offset, guint64 *bytes_read, JBatch *batch) |
|
void | j_item_write (JItem *item, gconstpointer data, guint64 length, guint64 offset, guint64 *bytes_written, JBatch *batch) |
|
void | j_item_get_status (JItem *item, JBatch *batch) |
|
guint64 | j_item_get_size (JItem *item) |
|
gint64 | j_item_get_modification_time (JItem *item) |
|
Data structures and functions for managing items.
◆ JItem
◆ JItemGetData
◆ j_item_create()
Creates an item in a collection.
- Parameters
-
collection | A collection. |
name | A name. |
distribution | A distribution. |
batch | A batch. |
- Returns
- A new item. Should be freed with j_item_unref().
◆ j_item_delete()
Deletes an item from a collection.
- Parameters
-
item | An item. |
batch | A batch. |
◆ j_item_get()
Gets an item from a collection.
- Parameters
-
collection | A collection. |
item | A pointer to an item. |
name | A name. |
batch | A batch. |
◆ j_item_get_modification_time()
gint64 j_item_get_modification_time |
( |
JItem * |
item | ) |
|
Returns an item's modification time.
- Parameters
-
- Returns
- A modification time.
◆ j_item_get_name()
gchar const * j_item_get_name |
( |
JItem * |
item | ) |
|
Returns an item's name.
- Parameters
-
- Returns
- The name.
◆ j_item_get_size()
guint64 j_item_get_size |
( |
JItem * |
item | ) |
|
Returns an item's size.
- Parameters
-
- Returns
- A size.
◆ j_item_get_status()
void j_item_get_status |
( |
JItem * |
item, |
|
|
JBatch * |
batch |
|
) |
| |
Get the status of an item.
- Parameters
-
item | An item. |
batch | A batch. |
- Todo:
- check j_item_get_status_exec
◆ j_item_read()
void j_item_read |
( |
JItem * |
item, |
|
|
gpointer |
data, |
|
|
guint64 |
length, |
|
|
guint64 |
offset, |
|
|
guint64 * |
bytes_read, |
|
|
JBatch * |
batch |
|
) |
| |
Reads an item.
- Parameters
-
item | An item. |
data | A buffer to hold the read data. |
length | Number of bytes to read. |
offset | An offset within item . |
bytes_read | Number of bytes read. |
batch | A batch. |
◆ j_item_ref()
Increases an item's reference count.
G_END_DECLS G_BEGIN_DECLS JItem * j_item_ref(JItem *item)
Definition: jitem.c:108
- Parameters
-
- Returns
item
.
◆ j_item_set_modification_time()
void j_item_set_modification_time |
( |
JItem * |
item, |
|
|
gint64 |
modification_time |
|
) |
| |
Sets an item's modification time.
- Parameters
-
item | An item. |
modification_time | A modification time. |
◆ j_item_set_size()
void j_item_set_size |
( |
JItem * |
item, |
|
|
guint64 |
size |
|
) |
| |
Sets an item's size.
- Parameters
-
◆ j_item_unref()
void j_item_unref |
( |
JItem * |
item | ) |
|
Decreases an item's reference count. When the reference count reaches zero, frees the memory allocated for the item.
- Parameters
-
◆ j_item_write()
void j_item_write |
( |
JItem * |
item, |
|
|
gconstpointer |
data, |
|
|
guint64 |
length, |
|
|
guint64 |
offset, |
|
|
guint64 * |
bytes_written, |
|
|
JBatch * |
batch |
|
) |
| |
Writes an item.
- Note
- j_item_write() modifies bytes_written even if j_batch_execute() is not called.
- Parameters
-
item | An item. |
data | A buffer holding the data to write. |
length | Number of bytes to write. |
offset | An offset within item . |
bytes_written | Number of bytes written. |
batch | A batch. |
- Todo:
- see j_item_write_exec