## pk-package-ids

pk-package-ids — Functionality to modify multiple PackageIDs

## Synopsis

    #define             PK_PACKAGE_IDS_DELIM
    void                pk_package_ids_test                 (gpointer user_data);
    gchar **            pk_package_ids_from_id              (const gchar *package_id);
    gchar **            pk_package_ids_from_string          (const gchar *package_id);
    gboolean            pk_package_ids_check                (gchar **package_ids);
    gchar *             pk_package_ids_to_string            (gchar **package_ids);
    gboolean            pk_package_ids_present_id           (gchar **package_ids,
                                                             const gchar *package_id);
    gchar **            pk_package_ids_add_id               (gchar **package_ids,
                                                             const gchar *package_id);
    gchar **            pk_package_ids_add_ids              (gchar **package_ids,
                                                             gchar **package_ids_new);
    gchar **            pk_package_ids_remove_id            (gchar **package_ids,
                                                             const gchar *package_id);
    #define             pk_package_ids_from_text
    #define             pk_package_ids_to_text

## Description

Composite PackageId's are difficult to read and create.

## Details

### PK_PACKAGE_IDS_DELIM

    #define PK_PACKAGE_IDS_DELIM "&"

### pk_package_ids_test ()

    void                pk_package_ids_test                 (gpointer user_data);

`user_data` : |

### pk_package_ids_from_id ()

    gchar **            pk_package_ids_from_id              (const gchar *package_id);

Form a composite string array of package_id's from a single package_id

`package_id` : | A single package_id
Returns : | the string array, or `NULL` if invalid, free with `g_strfreev()`. [transfer full]

Since 0.5.2

### pk_package_ids_from_string ()

    gchar **            pk_package_ids_from_string          (const gchar *package_id);

Form a composite string array of package_id's from a delimited string

`package_id` : | A single package_id
Returns : | the string array, or `NULL` if invalid, free with `g_strfreev()`. [transfer full]

Since 0.5.2

### pk_package_ids_check ()

    gboolean            pk_package_ids_check                (gchar **package_ids);

Check the string array of package_id's for validity

`package_ids` : | a string array of package_id's
Returns : | `TRUE` if the package_ids are all valid.

Since 0.5.2

### pk_package_ids_to_string ()

    gchar *             pk_package_ids_to_string            (gchar **package_ids);

Cats the string array of package_id's into one delimited string

`package_ids` : | a string array of package_id's
Returns : | a string representation of all the package_id's.

Since 0.5.2

### pk_package_ids_present_id ()

    gboolean            pk_package_ids_present_id           (gchar **package_ids,
                                                             const gchar *package_id);

Finds out if a package ID is present in the list.

`package_ids` : | a string array of package_id's
`package_id` : | a single package_id
Returns : | `TRUE` if the package ID is present

Since 0.5.2

### pk_package_ids_add_id ()

    gchar **            pk_package_ids_add_id               (gchar **package_ids,
                                                             const gchar *package_id);

Adds a package_id to an existing list.

`package_ids` : | a string array of package_id's
`package_id` : | a single package_id
Returns : | the new list, free `g_strfreev()`. [transfer full]

Since 0.5.2

### pk_package_ids_add_ids ()

    gchar **            pk_package_ids_add_ids              (gchar **package_ids,
                                                             gchar **package_ids_new);

Adds a package_id to an existing list.

`package_ids` : | a string array of package_id's
`package_ids_new` : | a string array of package_id's
Returns : | the new list, free `g_strfreev()`. [transfer full]

Since 0.5.2

### pk_package_ids_remove_id ()

    gchar **            pk_package_ids_remove_id            (gchar **package_ids,
                                                             const gchar *package_id);

Removes a package ID from the the list.

`package_ids` : | a string array of package_id's
`package_id` : | a single package_id
Returns : | the new list, free `g_strfreev()`. [transfer full]

Since 0.5.2

### pk_package_ids_from_text

    #define pk_package_ids_from_text pk_package_ids_from_string

### pk_package_ids_to_text

    #define pk_package_ids_to_text		pk_package_ids_to_string