PkPackage

PkPackage — Package object

Synopsis

#define             PK_PACKAGE_ERROR
#define             PK_PACKAGE_TYPE_ERROR
                    PkPackagePrivate;
                    PkPackage;
GQuark              pk_package_error_quark              (void);
PkPackage *         pk_package_new                      (void);
void                pk_package_test                     (gpointer user_data);
gboolean            pk_package_set_id                   (PkPackage *package,
                                                         const gchar *package_id,
                                                         GError **error);
const gchar *       pk_package_get_id                   (PkPackage *package);
PkInfoEnum          pk_package_get_info                 (PkPackage *package);
const gchar *       pk_package_get_summary              (PkPackage *package);
void                pk_package_print                    (PkPackage *package);
gboolean            pk_package_equal                    (PkPackage *package1,
                                                         PkPackage *package2);
gboolean            pk_package_equal_id                 (PkPackage *package1,
                                                         PkPackage *package2);

Object Hierarchy

  GObject
   +----PkPackage

Properties

  "description"              gchar*                : Read / Write
  "group"                    guint                 : Read / Write
  "info"                     guint                 : Read / Write
  "license"                  gchar*                : Read / Write
  "package-id"               gchar*                : Read / Write
  "size"                     guint64               : Read / Write
  "summary"                  gchar*                : Read / Write
  "update-bugzilla-url"      gchar*                : Read / Write
  "update-changelog"         gchar*                : Read / Write
  "update-cve-url"           gchar*                : Read / Write
  "update-issued"            gchar*                : Read / Write
  "update-obsoletes"         gchar*                : Read / Write
  "update-restart"           guint                 : Read / Write
  "update-state"             guint                 : Read / Write
  "update-text"              gchar*                : Read / Write
  "update-updated"           gchar*                : Read / Write
  "update-updates"           gchar*                : Read / Write
  "update-vendor-url"        gchar*                : Read / Write
  "url"                      gchar*                : Read / Write

Signals

  "changed"                                        : Run Last

Description

This GObject represents a package from a transaction. These objects represent single items of data from the transaction, and are often present in lists (PkResults) or just refcounted in client programs.

Details

PK_PACKAGE_ERROR

#define PK_PACKAGE_ERROR (pk_package_error_quark ())


PK_PACKAGE_TYPE_ERROR

#define PK_PACKAGE_TYPE_ERROR (pk_package_error_get_type ())


PkPackagePrivate

typedef struct _PkPackagePrivate PkPackagePrivate;

Private PkPackage data


PkPackage

typedef struct _PkPackage PkPackage;


pk_package_error_quark ()

GQuark              pk_package_error_quark              (void);

Returns :


pk_package_new ()

PkPackage *         pk_package_new                      (void);

Returns :

a new PkPackage object.

pk_package_test ()

void                pk_package_test                     (gpointer user_data);

user_data :


pk_package_set_id ()

gboolean            pk_package_set_id                   (PkPackage *package,
                                                         const gchar *package_id,
                                                         GError **error);

Sets the package object to have the given ID

package :

a valid PkPackage instance

package_id :

the valid package_id

error :

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

Returns :

TRUE if the package_id was set

pk_package_get_id ()

const gchar *       pk_package_get_id                   (PkPackage *package);

Gets the package object ID

package :

a valid PkPackage instance

Returns :

the ID, or NULL if unset

pk_package_get_info ()

PkInfoEnum          pk_package_get_info                 (PkPackage *package);

Gets the package object ID

package :

a valid PkPackage instance

Returns :

the PkInfoEnum

pk_package_get_summary ()

const gchar *       pk_package_get_summary              (PkPackage *package);

Gets the package object ID

package :

a valid PkPackage instance

Returns :

the summary, or NULL if unset

pk_package_print ()

void                pk_package_print                    (PkPackage *package);

Prints details about the package to standard out.

package :

a valid PkPackage instance

pk_package_equal ()

gboolean            pk_package_equal                    (PkPackage *package1,
                                                         PkPackage *package2);

Do the PkPackage's have the same ID.

package1 :

a valid PkPackage instance

package2 :

a valid PkPackage instance

Returns :

TRUE if the packages have the same package_id, info and summary.

pk_package_equal_id ()

gboolean            pk_package_equal_id                 (PkPackage *package1,
                                                         PkPackage *package2);

Do the PkPackage's have the same ID.

package1 :

a valid PkPackage instance

package2 :

a valid PkPackage instance

Returns :

TRUE if the packages have the same package_id.

Property Details

The "description" property

  "description"              gchar*                : Read / Write

The package description.

Default value: NULL


The "group" property

  "group"                    guint                 : Read / Write

The package group.

Allowed values: <= 35

Default value: 0


The "info" property

  "info"                     guint                 : Read / Write

The PkInfoEnum package type, e.g. PK_INFO_ENUM_NORMAL.

Default value: 0


The "license" property

  "license"                  gchar*                : Read / Write

The package license.

Default value: NULL


The "package-id" property

  "package-id"               gchar*                : Read / Write

The full package_id, e.g. 'gnome-power-manager;0.1.2;i386;fedora'.

Default value: NULL


The "size" property

  "size"                     guint64               : Read / Write

The package size.

Default value: 0


The "summary" property

  "summary"                  gchar*                : Read / Write

The package summary.

Default value: NULL


The "update-bugzilla-url" property

  "update-bugzilla-url"      gchar*                : Read / Write

The update bugzilla URL.

Default value: NULL


The "update-changelog" property

  "update-changelog"         gchar*                : Read / Write

The update ChangeLog.

Default value: NULL


The "update-cve-url" property

  "update-cve-url"           gchar*                : Read / Write

The update CVE URL.

Default value: NULL


The "update-issued" property

  "update-issued"            gchar*                : Read / Write

When the update was issued.

Default value: NULL


The "update-obsoletes" property

  "update-obsoletes"         gchar*                : Read / Write

The update packages that are obsoleted.

Default value: NULL


The "update-restart" property

  "update-restart"           guint                 : Read / Write

The update restart type.

Allowed values: <= 7

Default value: 0


The "update-state" property

  "update-state"             guint                 : Read / Write

The update state.

Allowed values: <= 4

Default value: 0


The "update-text" property

  "update-text"              gchar*                : Read / Write

The update description.

Default value: NULL


The "update-updated" property

  "update-updated"           gchar*                : Read / Write

When the update was last updated.

Default value: NULL


The "update-updates" property

  "update-updates"           gchar*                : Read / Write

The update packages.

Default value: NULL


The "update-vendor-url" property

  "update-vendor-url"        gchar*                : Read / Write

The update vendor URL.

Default value: NULL


The "url" property

  "url"                      gchar*                : Read / Write

The package homepage URL.

Default value: NULL

Signal Details

The "changed" signal

void                user_function                      (PkPackage *package,
                                                        gpointer   user_data)      : Run Last

The ::changed signal is emitted when the package data may have changed.

package :

the PkPackage instance that emitted the signal

user_data :

user data set when the signal handler was connected.