ZIF Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define ZIF_HISTORY_ERROR struct ZifHistory; struct ZifHistoryClass; enum ZifHistoryError; GQuark zif_history_error_quark (void
); ZifHistory * zif_history_new (void
); gboolean zif_history_add_entry (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,ZifTransactionReason reason
,guint uid
,const gchar *command_line
,GError **error
); GArray * zif_history_list_transactions (ZifHistory *history
,GError **error
); GArray * zif_history_get_transactions_for_package (ZifHistory *history
,ZifPackage *package
,GError **error
); GPtrArray * zif_history_get_packages (ZifHistory *history
,gint64 timestamp
,GError **error
); guint zif_history_get_uid (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
); gchar * zif_history_get_cmdline (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
); gchar * zif_history_get_repo (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
); ZifTransactionReason zif_history_get_reason (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
); gchar * zif_history_get_repo_newest (ZifHistory *history
,ZifPackage *package
,GError **error
); gboolean zif_history_import (ZifHistory *history
,ZifDb *db
,GError **error
); gboolean zif_history_set_repo_for_store (ZifHistory *history
,ZifStore *store
,GError **error
);
ZifHistory allows the user to see past transaction details to see what was installed, upgraded and the reasons why.
struct ZifHistoryClass { GObjectClass parent_class; /* Padding for future expansion */ void (*_zif_reserved1) (void); void (*_zif_reserved2) (void); void (*_zif_reserved3) (void); void (*_zif_reserved4) (void); };
typedef enum { ZIF_HISTORY_ERROR_FAILED, ZIF_HISTORY_ERROR_FAILED_TO_OPEN, ZIF_HISTORY_ERROR_LAST } ZifHistoryError;
GQuark zif_history_error_quark (void
);
Returns : |
An error quark. |
Since 0.2.4
ZifHistory * zif_history_new (void
);
Returns : |
A new ZifHistory instance. |
Since 0.2.4
gboolean zif_history_add_entry (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,ZifTransactionReason reason
,guint uid
,const gchar *command_line
,GError **error
);
Adds an entry into the zif history store
|
A ZifHistory |
|
A ZifPackage |
|
A timestamp |
|
A ZifTransactionReason
|
|
A GError, or NULL
|
Returns : |
TRUE on success |
Since 0.2.4
GArray * zif_history_list_transactions (ZifHistory *history
,GError **error
);
Returns an array of transaction timestamps. Each timestamp may correspond to a number of modified packages.
|
A ZifHistory |
|
A GError, or NULL
|
Returns : |
an GArray of gint64. [element-type gint64][transfer container] |
Since 0.2.4
GArray * zif_history_get_transactions_for_package (ZifHistory *history
,ZifPackage *package
,GError **error
);
Returns an array of transaction timestamps. Each timestamp may correspond to a number of modified packages.
|
A ZifHistory |
|
A ZifPackage |
|
A GError, or NULL
|
Returns : |
an GArray of gint64. [element-type gint64][transfer container] |
Since 0.2.6
GPtrArray * zif_history_get_packages (ZifHistory *history
,gint64 timestamp
,GError **error
);
Return all the packages that were modified on a specified timestamp.
|
A ZifHistory |
|
A timestamp |
|
A GError, or NULL
|
Returns : |
A GPtrArray of ZifPackage's with the specified timestamp. [element-type ZifPackage][transfer container] |
Since 0.2.4
guint zif_history_get_uid (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
);
Gets the user id for the specified package for the given timestamp.
|
A ZifHistory |
|
A ZifPackage |
|
A timestamp |
|
A GError, or NULL
|
Returns : |
A UID, or G_MAXUINT for error |
Since 0.2.4
gchar * zif_history_get_cmdline (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
);
Gets the command line used to process the specified package for the given timestamp.
|
A ZifHistory |
|
A ZifPackage |
|
A timestamp |
|
A GError, or NULL
|
Returns : |
The command line, or NULL for error |
Since 0.2.4
gchar * zif_history_get_repo (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
);
Gets the source store id for the specified package for the given timestamp.
|
A ZifHistory |
|
A ZifPackage |
|
A timestamp |
|
A GError, or NULL
|
Returns : |
The store ID, or NULL for error |
Since 0.2.4
ZifTransactionReason zif_history_get_reason (ZifHistory *history
,ZifPackage *package
,gint64 timestamp
,GError **error
);
Gets the transaction reason for the specified package and the given timestamp.
|
A ZifHistory |
|
A ZifPackage |
|
A timestamp |
|
A GError, or NULL
|
Returns : |
The ZifTransactionReason , or ZIF_TRANSACTION_REASON_INVALID for error |
Since 0.2.4
gchar * zif_history_get_repo_newest (ZifHistory *history
,ZifPackage *package
,GError **error
);
Gets the source repository for a specific package. Note: this will return the repo for the most recently installed version of the package.
|
A ZifHistory |
|
A ZifPackage |
|
A GError, or NULL
|
Returns : |
The remote store ID for the installed package, or NULL
|
Since 0.2.4
gboolean zif_history_import (ZifHistory *history
,ZifDb *db
,GError **error
);
Imports a legacy yumdb database into the zif history store
|
A ZifHistory |
|
A ZifDb |
|
A GError, or NULL
|
Returns : |
TRUE on success |
Since 0.2.4
gboolean zif_history_set_repo_for_store (ZifHistory *history
,ZifStore *store
,GError **error
);
Sets all the repo_id values for every package in the store.
This is much quicker than calling zif_history_get_repo_newest()
for each package as only one SQL statement is prepared.
|
A ZifHistory |
|
A ZifStore |
|
A GError, or NULL
|
Returns : |
TRUE on success |
Since 0.2.4