Constructor

PackageKitPackagenew_full

unstable since: 2.0.0

Declaration [src]

PkPackage*
pk_package_new_full (
  PkInfoEnum info,
  const gchar* package_id,
  const gchar* summary,
  PkSeverityEnum update_severity,
  GError** error
)

Description [src]

Creates a new PkPackage with all its main properties set. The package_id has to be a valid package-id, as checked by pk_package_set_id().

Available since: 2.0.0

Parameters

info

Type: PkInfoEnum

The PkInfoEnum.

package_id

Type: const gchar*

The package-id, e.g. “gnome-power-manager;2.30.1;i386;fedora”.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
summary

Type: const gchar*

The one-line package summary.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
update_severity

Type: PkSeverityEnum

The PkSeverityEnum describing the update severity, or PK_SEVERITY_ENUM_NONE if not known or not applicable.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the constructor if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: PkPackage

A new PkPackage, or NULL if the package_id is not valid.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.