## PkCatalog PkCatalog — Functionality for installing catalogs |

## Synopsis

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

## Object Hierarchy

      GObject
       +----PkCatalog

      GEnum
       +----PkCatalogError

## Description

Clients can use this GObject for installing catalog files.

## Details

### PK_CATALOG_ERROR

    #define PK_CATALOG_ERROR (pk_catalog_error_quark ())

### PK_CATALOG_FILE_EXTENSION

    #define PK_CATALOG_FILE_EXTENSION "catalog"

### PK_CATALOG_FILE_HEADER

    #define PK_CATALOG_FILE_HEADER		"PackageKit Catalog"

### PK_CATALOG_TYPE_ERROR

    #define PK_CATALOG_TYPE_ERROR (pk_catalog_error_get_type ())

### struct PkCatalog

    struct PkCatalog;

### struct PkCatalogClass

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

### enum PkCatalogError

    typedef enum {
    	PK_CATALOG_ERROR_FAILED
    } PkCatalogError;

### pk_catalog_error_quark ()

    GQuark              pk_catalog_error_quark              (void);

Returns : | Our personal error quark.

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`
`callback` : | the function to run on completion
`progress_callback` : | the function to run when the progress changes. [scope call]
`progress_user_data` : | data to pass to `progress_callback`
`user_data` : | the data to pass to `callback`

Since 0.5.3

### 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 container]

Since 0.5.3

### 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);