ZifUpdate

ZifUpdate — Generic object to represent some information about an update.

Synopsis

#define             ZIF_UPDATE_ERROR
                    ZifUpdate;
                    ZifUpdatePrivate;
                    ZifUpdateClass;
enum                ZifUpdateState;
enum                ZifUpdateKind;
ZifUpdate *         zif_update_new                      (void);
ZifUpdateState      zif_update_state_from_string        (const gchar *state);
ZifUpdateKind       zif_update_kind_from_string         (const gchar *kind);
const gchar *       zif_update_state_to_string          (ZifUpdateState state);
const gchar *       zif_update_kind_to_string           (ZifUpdateKind kind);
ZifUpdateState      zif_update_get_state                (ZifUpdate *update);
ZifUpdateKind       zif_update_get_kind                 (ZifUpdate *update);
const gchar *       zif_update_get_id                   (ZifUpdate *update);
const gchar *       zif_update_get_title                (ZifUpdate *update);
const gchar *       zif_update_get_description          (ZifUpdate *update);
const gchar *       zif_update_get_issued               (ZifUpdate *update);
gboolean            zif_update_get_reboot               (ZifUpdate *update);
GPtrArray *         zif_update_get_update_infos         (ZifUpdate *update);
GPtrArray *         zif_update_get_packages             (ZifUpdate *update);
GPtrArray *         zif_update_get_changelog            (ZifUpdate *update);
void                zif_update_set_state                (ZifUpdate *update,
                                                         ZifUpdateState state);
void                zif_update_set_kind                 (ZifUpdate *update,
                                                         ZifUpdateKind kind);
void                zif_update_set_id                   (ZifUpdate *update,
                                                         const gchar *id);
void                zif_update_set_title                (ZifUpdate *update,
                                                         const gchar *title);
void                zif_update_set_description          (ZifUpdate *update,
                                                         const gchar *description);
void                zif_update_set_issued               (ZifUpdate *update,
                                                         const gchar *issued);
void                zif_update_set_reboot               (ZifUpdate *update,
                                                         gboolean reboot);
void                zif_update_add_update_info          (ZifUpdate *update,
                                                         ZifUpdateInfo *update_info);
void                zif_update_add_package              (ZifUpdate *update,
                                                         ZifPackage *package);
void                zif_update_add_changeset            (ZifUpdate *update,
                                                         ZifChangeset *changeset);

Object Hierarchy

  GObject
   +----ZifUpdate

Properties

  "description"              gchar*                : Read
  "id"                       gchar*                : Read
  "issued"                   gchar*                : Read
  "kind"                     guint                 : Read
  "reboot"                   gboolean              : Read
  "state"                    guint                 : Read
  "title"                    gchar*                : Read

Description

Details

ZIF_UPDATE_ERROR

#define ZIF_UPDATE_ERROR (zif_update_error_quark ())


ZifUpdate

typedef struct _ZifUpdate ZifUpdate;


ZifUpdatePrivate

typedef struct _ZifUpdatePrivate ZifUpdatePrivate;


ZifUpdateClass

typedef struct {
	GObjectClass		 parent_class;
} ZifUpdateClass;


enum ZifUpdateState

typedef enum {
	ZIF_UPDATE_STATE_STABLE,
	ZIF_UPDATE_STATE_TESTING,
	ZIF_UPDATE_STATE_UNKNOWN
} ZifUpdateState;


enum ZifUpdateKind

typedef enum {
	ZIF_UPDATE_KIND_BUGFIX,
	ZIF_UPDATE_KIND_SECURITY,
	ZIF_UPDATE_KIND_ENHANCEMENT,
	ZIF_UPDATE_KIND_NEWPACKAGE,
	ZIF_UPDATE_KIND_UNKNOWN
} ZifUpdateKind;


zif_update_new ()

ZifUpdate *         zif_update_new                      (void);

Returns :

A new ZifUpdate class instance.

Since 0.1.0


zif_update_state_from_string ()

ZifUpdateState      zif_update_state_from_string        (const gchar *state);

state :

Returns :


zif_update_kind_from_string ()

ZifUpdateKind       zif_update_kind_from_string         (const gchar *kind);

kind :

Returns :


zif_update_state_to_string ()

const gchar *       zif_update_state_to_string          (ZifUpdateState state);

state :

Returns :


zif_update_kind_to_string ()

const gchar *       zif_update_kind_to_string           (ZifUpdateKind kind);

kind :

Returns :


zif_update_get_state ()

ZifUpdateState      zif_update_get_state                (ZifUpdate *update);

Gets the update state.

update :

the ZifUpdate object

Returns :

the state of update, e.g. PK_UPDATE_STATE_ENUM_STABLE.

Since 0.1.0


zif_update_get_kind ()

ZifUpdateKind       zif_update_get_kind                 (ZifUpdate *update);

Gets the update kind.

update :

the ZifUpdate object

Returns :

the state of update, e.g. PK_INFO_ENUM_SECURITY.

Since 0.1.0


zif_update_get_id ()

const gchar *       zif_update_get_id                   (ZifUpdate *update);

Gets the ID for this update.

update :

the ZifUpdate object

Returns :

A string value, or NULL.

Since 0.1.0


zif_update_get_title ()

const gchar *       zif_update_get_title                (ZifUpdate *update);

Gets the title for this update.

update :

the ZifUpdate object

Returns :

A string value, or NULL.

Since 0.1.0


zif_update_get_description ()

const gchar *       zif_update_get_description          (ZifUpdate *update);

Gets the description for this update.

update :

the ZifUpdate object

Returns :

A string value, or NULL.

Since 0.1.0


zif_update_get_issued ()

const gchar *       zif_update_get_issued               (ZifUpdate *update);

Gets the time this update was issued.

update :

the ZifUpdate object

Returns :

A string value, or NULL.

Since 0.1.0


zif_update_get_reboot ()

gboolean            zif_update_get_reboot               (ZifUpdate *update);

Gets if the update requires a reboot.

update :

the ZifUpdate object

Returns :

TRUE for a reboot.

Since 0.1.0


zif_update_get_update_infos ()

GPtrArray *         zif_update_get_update_infos         (ZifUpdate *update);

Gets the update info for this update.

update :

the ZifUpdate object

Returns :

A refcounted GPtrArray of ZifUpdateInfo, or NULL. Free with g_ptr_array_unref().

Since 0.1.0


zif_update_get_packages ()

GPtrArray *         zif_update_get_packages             (ZifUpdate *update);

Gets the packages for this update.

update :

the ZifUpdate object

Returns :

A refcounted GPtrArray of ZifPackage, or NULL. Free with g_ptr_array_unref().

Since 0.1.0


zif_update_get_changelog ()

GPtrArray *         zif_update_get_changelog            (ZifUpdate *update);

Gets the changelog for this update.

update :

the ZifUpdate object

Returns :

A refcounted GPtrArray of ZifChangeset's, or NULL. Free with g_ptr_array_unref().

Since 0.1.0


zif_update_set_state ()

void                zif_update_set_state                (ZifUpdate *update,
                                                         ZifUpdateState state);

Sets the update state status.

update :

the ZifUpdate object

state :

If the update is state

Since 0.1.0


zif_update_set_kind ()

void                zif_update_set_kind                 (ZifUpdate *update,
                                                         ZifUpdateKind kind);

Sets the kind of update.

update :

the ZifUpdate object

kind :

the update kind, e.g. PK_INFO_ENUM_SECURITY.

Since 0.1.0


zif_update_set_id ()

void                zif_update_set_id                   (ZifUpdate *update,
                                                         const gchar *id);

Sets the update ID.

update :

the ZifUpdate object

id :

the update ID

Since 0.1.0


zif_update_set_title ()

void                zif_update_set_title                (ZifUpdate *update,
                                                         const gchar *title);

Sets the update title.

update :

the ZifUpdate object

title :

the update title

Since 0.1.0


zif_update_set_description ()

void                zif_update_set_description          (ZifUpdate *update,
                                                         const gchar *description);

Sets the update description.

update :

the ZifUpdate object

description :

the update description

Since 0.1.0


zif_update_set_issued ()

void                zif_update_set_issued               (ZifUpdate *update,
                                                         const gchar *issued);

Sets the time the update was issued.

update :

the ZifUpdate object

issued :

the update issued time

Since 0.1.0


zif_update_set_reboot ()

void                zif_update_set_reboot               (ZifUpdate *update,
                                                         gboolean reboot);

Sets the update reboot status

update :

the ZifUpdate object

reboot :

if the update requires a reboot

Since 0.1.0


zif_update_add_update_info ()

void                zif_update_add_update_info          (ZifUpdate *update,
                                                         ZifUpdateInfo *update_info);

Adds some update info to the update.

update :

the ZifUpdate object

update_info :

the ZifUpdateInfo

Since 0.1.0


zif_update_add_package ()

void                zif_update_add_package              (ZifUpdate *update,
                                                         ZifPackage *package);

Adds some update info to the update.

update :

the ZifUpdate object

package :

the ZifPackage

Since 0.1.0


zif_update_add_changeset ()

void                zif_update_add_changeset            (ZifUpdate *update,
                                                         ZifChangeset *changeset);

Adds a changeset to the update.

update :

the ZifUpdate object

changeset :

the ZifChangeset

Since 0.1.0

Property Details

The "description" property

  "description"              gchar*                : Read

Default value: NULL

Since 0.1.0


The "id" property

  "id"                       gchar*                : Read

Default value: NULL

Since 0.1.0


The "issued" property

  "issued"                   gchar*                : Read

Default value: NULL

Since 0.1.0


The "kind" property

  "kind"                     guint                 : Read

Default value: 0

Since 0.1.0


The "reboot" property

  "reboot"                   gboolean              : Read

Default value: FALSE

Since 0.1.0


The "state" property

  "state"                    guint                 : Read

Default value: 0

Since 0.1.0


The "title" property

  "title"                    gchar*                : Read

Default value: NULL

Since 0.1.0