## PkCatalog

PkCatalog — Functionality for installing catalogs

## Synopsis

    #define             PK_CATALOG_ERROR
    #define             PK_CATALOG_TYPE_ERROR
    #define             PK_CATALOG_FILE_EXTENSION
    #define             PK_CATALOG_FILE_HEADER
    enum                PkCatalogError;
                        PkCatalogPrivate;
                        PkCatalog;
                        PkCatalogClass;
    GQuark              pk_catalog_error_quark              (void);
    GType               pk_catalog_get_type                 (void);
    PkCatalog *         pk_catalog_new                      (void);
    void                pk_catalog_test                     (gpointer user_data);
    GPtrArray *         pk_catalog_lookup_finish            (PkCatalog *catalog,
                                                             GAsyncResult *res,
                                                             GError **error);
    void                pk_catalog_lookup_async             (PkCatalog *catalog,
                                                             const gchar *filename,
                                                             GCancellable *cancellable,
                                                             PkProgressCallback progress_callback,
                                                             gpointer progress_user_data,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

## Object Hierarchy

      GObject
       +----PkCatalog

## Description

Clients can use this GObject for installing catalog files.

## Details

### PK_CATALOG_ERROR

    #define PK_CATALOG_ERROR (pk_catalog_error_quark ())

### PK_CATALOG_TYPE_ERROR

    #define PK_CATALOG_TYPE_ERROR (pk_catalog_error_get_type ())

### PK_CATALOG_FILE_EXTENSION

    #define PK_CATALOG_FILE_EXTENSION "catalog"

### PK_CATALOG_FILE_HEADER

    #define PK_CATALOG_FILE_HEADER		"PackageKit Catalog"

### enum PkCatalogError

    typedef enum
    {
    	PK_CATALOG_ERROR_FAILED
    } PkCatalogError;

### PkCatalogPrivate

    typedef struct _PkCatalogPrivate PkCatalogPrivate;

Private PkCatalog data

### PkCatalog

    typedef struct _PkCatalog PkCatalog;

### PkCatalogClass

    typedef struct {
    	GObjectClass parent_class;
    	/* Padding for future expansion */
    	void (*_pk_reserved1) (void);
    	void (*_pk_reserved2) (void);
    	void (*_pk_reserved3) (void);
    	void (*_pk_reserved4) (void);
    } PkCatalogClass;

### pk_catalog_error_quark ()

    GQuark              pk_catalog_error_quark              (void);

Returns : | Our personal error quark.

Since 0.5.3

### pk_catalog_get_type ()

    GType               pk_catalog_get_type                 (void);

Returns : |

### pk_catalog_new ()

    PkCatalog *         pk_catalog_new                      (void);

Returns : | A new catalog class instance.

Since 0.5.3

### pk_catalog_test ()

    void                pk_catalog_test                     (gpointer user_data);

`user_data` : |

### pk_catalog_lookup_finish ()

    GPtrArray *         pk_catalog_lookup_finish            (PkCatalog *catalog,
                                                             GAsyncResult *res,
                                                             GError **error);

Gets the result from the asynchronous function.

`catalog` : | a valid PkCatalog instance
`res` : | the GAsyncResult
`error` : | A GError or `NULL`
Returns : | the GPtrArray of PkPackage's, or `NULL`. Free with `g_ptr_array_unref()`. [transfer full]

Since 0.5.3

### pk_catalog_lookup_async ()

    void                pk_catalog_lookup_async             (PkCatalog *catalog,
                                                             const gchar *filename,
                                                             GCancellable *cancellable,
                                                             PkProgressCallback progress_callback,
                                                             gpointer progress_user_data,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Simulate the install of a catalog file.

`catalog` : | a valid PkCatalog instance
`filename` : | the filename of the catalog to install
`cancellable` : | a GCancellable or `NULL`
`progress_callback` : | the function to run when the progress changes. [scope call]
`progress_user_data` : | data to pass to `progress_callback`
`callback` : | the function to run on completion
`user_data` : | the data to pass to `callback`

Since 0.5.3