![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define PK_PACKAGE_TYPE_ERROR struct PkPackage; struct PkPackageClass; 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
); void pk_package_print (PkPackage *package
); gboolean pk_package_equal (PkPackage *package1
,PkPackage *package2
); gboolean pk_package_equal_id (PkPackage *package1
,PkPackage *package2
); const gchar * pk_package_get_id (PkPackage *package
); PkInfoEnum pk_package_get_info (PkPackage *package
); const gchar * pk_package_get_summary (PkPackage *package
); const gchar * pk_package_get_name (PkPackage *package
); const gchar * pk_package_get_version (PkPackage *package
); const gchar * pk_package_get_arch (PkPackage *package
); const gchar * pk_package_get_data (PkPackage *package
); PkPackagePrivate;
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.
struct PkPackageClass { PkSourceClass parent_class; /* signals */ void (* changed) (PkPackage *package); /* padding for future expansion */ void (*_pk_reserved1) (void); void (*_pk_reserved2) (void); void (*_pk_reserved3) (void); void (*_pk_reserved4) (void); void (*_pk_reserved5) (void); };
gboolean pk_package_set_id (PkPackage *package
,const gchar *package_id
,GError **error
);
Sets the package object to have the given ID
|
a valid PkPackage instance |
|
the valid package_id |
|
a GError to put the error code and message in, or NULL
|
Returns : |
TRUE if the package_id was set |
Since 0.5.4
void pk_package_print (PkPackage *package
);
Prints details about the package to standard out.
|
a valid PkPackage instance |
Since 0.5.4
gboolean pk_package_equal (PkPackage *package1
,PkPackage *package2
);
Do the PkPackage's have the same ID.
|
a valid PkPackage instance |
|
a valid PkPackage instance |
Returns : |
TRUE if the packages have the same package_id, info and summary. |
Since 0.5.4
gboolean pk_package_equal_id (PkPackage *package1
,PkPackage *package2
);
Do the PkPackage's have the same ID.
|
a valid PkPackage instance |
|
a valid PkPackage instance |
Returns : |
TRUE if the packages have the same package_id. |
Since 0.5.4
const gchar * pk_package_get_id (PkPackage *package
);
Gets the package object ID
|
a valid PkPackage instance |
Returns : |
the ID, or NULL if unset |
Since 0.5.4
PkInfoEnum pk_package_get_info (PkPackage *package
);
Gets the package object ID
|
a valid PkPackage instance |
Returns : |
the PkInfoEnum
|
Since 0.5.4
const gchar * pk_package_get_summary (PkPackage *package
);
Gets the package object ID
|
a valid PkPackage instance |
Returns : |
the summary, or NULL if unset |
Since 0.5.4
const gchar * pk_package_get_name (PkPackage *package
);
Gets the package name.
|
a valid PkPackage instance |
Returns : |
the name, or NULL if unset |
Since 0.6.4
const gchar * pk_package_get_version (PkPackage *package
);
Gets the package version.
|
a valid PkPackage instance |
Returns : |
the version, or NULL if unset |
Since 0.6.4
const gchar * pk_package_get_arch (PkPackage *package
);
Gets the package arch.
|
a valid PkPackage instance |
Returns : |
the arch, or NULL if unset |
Since 0.6.4
const gchar * pk_package_get_data (PkPackage *package
);
Gets the package data, which is usually the repository ID that contains the package. Special ID's include "installed" for installed packages, and "local" for local packages that exist on disk but not in a repoitory.
|
a valid PkPackage instance |
Returns : |
the data, or NULL if unset |
Since 0.6.4