JcatItem: libjcat Reference Manual

## JcatItem JcatItem |

## Functions

JcatItem * | jcat_item_new ()
gchar * | jcat_item_to_string ()
GPtrArray * | jcat_item_get_blobs ()
GPtrArray * | jcat_item_get_blobs_by_kind ()
void | jcat_item_add_blob ()
const gchar * | jcat_item_get_id ()
void | jcat_item_add_alias_id ()
void | jcat_item_remove_alias_id ()
GPtrArray * | jcat_item_get_alias_ids ()

## Types and Values

#define | JCAT_TYPE_ITEM
struct | JcatItemClass
| JcatItem

## Description

## Functions

### jcat_item_new ()

    JcatItem *
    jcat_item_new (const gchar *id);

Creates a new item.

#### Parameters

id | An item ID, typically a file basename |

#### Returns

a JcatItem

Since: 0.1.0

### jcat_item_to_string ()

    gchar *
    jcat_item_to_string (JcatItem *self);

Converts the JcatItem to a string.

#### Parameters

self | JcatItem |

#### Returns

string

Since: 0.1.0

### jcat_item_get_blobs ()

    GPtrArray *
    jcat_item_get_blobs (JcatItem *self);

Gets all the blobs for this item.

#### Parameters

self | JcatItem |

#### Returns

blobs.

[transfer container][element-type JcatBlob]

Since: 0.1.0

### jcat_item_get_blobs_by_kind ()

    GPtrArray *
    jcat_item_get_blobs_by_kind (JcatItem *self,
                                 JcatBlobKind kind);

Gets the item blobs by a specific kind.

#### Parameters

self | JcatItem |
kind | JcatBlobKind, e.g. `JCAT_BLOB_KIND_SHA256` |

#### Returns

blobs.

[transfer container][element-type JcatBlob]

Since: 0.1.0

### jcat_item_add_blob ()

    void
    jcat_item_add_blob (JcatItem *self,
                        JcatBlob *blob);

Adds a new blob to the item.

#### Parameters

self | JcatItem |
blob | JcatBlob |

Since: 0.1.0

### jcat_item_get_id ()

    const gchar *
    jcat_item_get_id (JcatItem *self);

Returns the item ID.

#### Parameters

self | JcatItem |

#### Returns

string.

[transfer none]

Since: 0.1.0

### jcat_item_add_alias_id ()

    void
    jcat_item_add_alias_id (JcatItem *self,
                            const gchar *id);

Adds an item alias ID. Alias IDs are matched when using functions such as `jcat_file_get_item_by_id()`.

#### Parameters

self | JcatItem |
id | An item ID alias, typically a file basename |

Since: 0.1.1

### jcat_item_remove_alias_id ()

    void
    jcat_item_remove_alias_id (JcatItem *self,
                               const gchar *id);

Removes an item alias ID.

#### Parameters

self | JcatItem |
id | An item ID alias, typically a file basename |

Since: 0.1.1

### jcat_item_get_alias_ids ()

    GPtrArray *
    jcat_item_get_alias_ids (JcatItem *self);

Gets the list of alias IDs.

#### Parameters

self | JcatItem |

#### Returns

array.

[transfer container][element-type utf8]

Since: 0.1.1

## Types and Values

### JCAT_TYPE_ITEM

    #define JCAT_TYPE_ITEM (jcat_item_get_type())

### struct JcatItemClass

    struct JcatItemClass {
    	GObjectClass parent_class;
    	gpointer padding[15];
    };

### JcatItem

    typedef struct _JcatItem JcatItem;