pk-package-ids
3
PACKAGEKIT Library

# pk-package-ids

Functionality to modify multiple PackageIDs

## Synopsis

    #define             PK_PACKAGE_IDS_DELIM
    gchar **            pk_package_ids_from_id              (const gchar *package_id);
    gchar **            pk_package_ids_from_text            (const gchar *package_id);
    gchar **            pk_package_ids_from_array           (GPtrArray *array);
    gchar **            pk_package_ids_from_va_list         (const gchar *package_id_first,
                                                             va_list *args);
    gboolean            pk_package_ids_check                (gchar **package_ids);
    gboolean            pk_package_ids_print                (gchar **package_ids);
    guint               pk_package_ids_size                 (gchar **package_ids);
    gchar *             pk_package_ids_to_text              (gchar **package_ids);

## Description

Composite PackageId's are difficult to read and create.

## Details

### PK_PACKAGE_IDS_DELIM

    #define PK_PACKAGE_IDS_DELIM	"&"

### 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()`

### pk_package_ids_from_text ()

    gchar **            pk_package_ids_from_text            (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()`

### pk_package_ids_from_array ()

    gchar **            pk_package_ids_from_array           (GPtrArray *array);

Form a composite string array of package_id's. The data in the GPtrArray is copied.

`array` :

  the GPtrArray of package_id's

Returns :

  the string array, or `NULL` if invalid

### pk_package_ids_from_va_list ()

    gchar **            pk_package_ids_from_va_list         (const gchar *package_id_first,
                                                             va_list *args);

Form a composite string array of package_id's.

`package_id_first` :

  the first package_id

`args` :

  any subsequant package_id's

Returns :

  the string array, or `NULL` if invalid

### 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.

### pk_package_ids_print ()

    gboolean            pk_package_ids_print                (gchar **package_ids);

Print the string array of package_id's

`package_ids` :

  a string array of package_id's

Returns :

  `TRUE` if we printed all the package_id's.

### pk_package_ids_size ()

    guint               pk_package_ids_size                 (gchar **package_ids);

Gets the size of the array

`package_ids` :

  a string array of package_id's

Returns :

  the size of the array.

### pk_package_ids_to_text ()

    gchar *             pk_package_ids_to_text              (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.