PkServicePack

PkServicePack — Functionality for creating and reading service packs

Synopsis

#define             PK_SERVICE_PACK_ERROR
#define             PK_SERVICE_PACK_TYPE_ERROR
#define             PK_SERVICE_PACK_FILE_EXTENSION
enum                PkServicePackError;
                    PkServicePackPrivate;
                    PkServicePack;
GQuark              pk_service_pack_error_quark         (void);
GType               pk_service_pack_get_type            (void);
PkServicePack *     pk_service_pack_new                 (void);
void                pk_service_pack_test                (gpointer user_data);
gboolean            pk_service_pack_check_valid         (PkServicePack *pack,
                                                         const gchar *filename,
                                                         GError **error);
gboolean            pk_service_pack_set_temp_directory  (PkServicePack *pack,
                                                         const gchar *directory);
gboolean            pk_service_pack_generic_finish      (PkServicePack *pack,
                                                         GAsyncResult *res,
                                                         GError **error);
void                pk_service_pack_create_for_package_ids_async
                                                        (PkServicePack *pack,
                                                         const gchar *filename,
                                                         gchar **package_ids,
                                                         gchar **package_ids_exclude,
                                                         GCancellable *cancellable,
                                                         PkProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
void                pk_service_pack_create_for_updates_async
                                                        (PkServicePack *pack,
                                                         const gchar *filename,
                                                         gchar **package_ids_exclude,
                                                         GCancellable *cancellable,
                                                         PkProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Object Hierarchy

  GObject
   +----PkServicePack

Description

Clients can use this GObject for reading and writing service packs.

Details

PK_SERVICE_PACK_ERROR

#define PK_SERVICE_PACK_ERROR	 	(pk_service_pack_error_quark ())


PK_SERVICE_PACK_TYPE_ERROR

#define PK_SERVICE_PACK_TYPE_ERROR (pk_service_pack_error_get_type ())


PK_SERVICE_PACK_FILE_EXTENSION

#define PK_SERVICE_PACK_FILE_EXTENSION "servicepack"


enum PkServicePackError

typedef enum
{
	PK_SERVICE_PACK_ERROR_FAILED_SETUP,
	PK_SERVICE_PACK_ERROR_FAILED_DOWNLOAD,
	PK_SERVICE_PACK_ERROR_FAILED_EXTRACTION,
	PK_SERVICE_PACK_ERROR_FAILED_CREATE,
	PK_SERVICE_PACK_ERROR_NOTHING_TO_DO,
	PK_SERVICE_PACK_ERROR_NOT_COMPATIBLE
} PkServicePackError;


PkServicePackPrivate

typedef struct _PkServicePackPrivate PkServicePackPrivate;

Private PkServicePack data


PkServicePack

typedef struct _PkServicePack PkServicePack;


pk_service_pack_error_quark ()

GQuark              pk_service_pack_error_quark         (void);

Returns :

Our personal error quark.

Since 0.5.2


pk_service_pack_get_type ()

GType               pk_service_pack_get_type            (void);

Returns :


pk_service_pack_new ()

PkServicePack *     pk_service_pack_new                 (void);

Returns :

A new service_pack class instance.

Since 0.5.2


pk_service_pack_test ()

void                pk_service_pack_test                (gpointer user_data);

user_data :


pk_service_pack_check_valid ()

gboolean            pk_service_pack_check_valid         (PkServicePack *pack,
                                                         const gchar *filename,
                                                         GError **error);

Checks to see if a service pack file is valid, and usable with this system.

pack :

a valid PkServicePack instance

filename :

the filename of the pack to check

error :

a GError to put the error code and message in, or NULL

Returns :

TRUE if the service pack is valid

Since 0.5.2


pk_service_pack_set_temp_directory ()

gboolean            pk_service_pack_set_temp_directory  (PkServicePack *pack,
                                                         const gchar *directory);

Sets the directory to use when decompressing the service pack

pack :

a valid PkServicePack instance

directory :

the directory to use, or NULL to use the default

Returns :

TRUE if the directory was set

Since 0.5.2


pk_service_pack_generic_finish ()

gboolean            pk_service_pack_generic_finish      (PkServicePack *pack,
                                                         GAsyncResult *res,
                                                         GError **error);

Gets the result from the asynchronous function.

pack :

a valid PkServicePack instance

res :

the GAsyncResult

error :

A GError or NULL

Returns :

TRUE for success

Since 0.5.2


pk_service_pack_create_for_package_ids_async ()

void                pk_service_pack_create_for_package_ids_async
                                                        (PkServicePack *pack,
                                                         const gchar *filename,
                                                         gchar **package_ids,
                                                         gchar **package_ids_exclude,
                                                         GCancellable *cancellable,
                                                         PkProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Create a service pack for the specified Package IDs

pack :

a valid PkServicePack instance

filename :

the filename of the service pack

package_ids :

a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"

package_ids_exclude :

An array of packages to exclude, or NULL

cancellable :

a GCancellable or NULL

progress_callback :

the function to run when the progress changes

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


pk_service_pack_create_for_updates_async ()

void                pk_service_pack_create_for_updates_async
                                                        (PkServicePack *pack,
                                                         const gchar *filename,
                                                         gchar **package_ids_exclude,
                                                         GCancellable *cancellable,
                                                         PkProgressCallback progress_callback,
                                                         gpointer progress_user_data,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Create a service pack for the specified Package IDs

pack :

a valid PkServicePack instance

filename :

the filename of the service pack

package_ids_exclude :

An array of packages to exclude, or NULL

cancellable :

a GCancellable or NULL

progress_callback :

the function to run when the progress changes

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