[pacman-dev] [PATCH 1/3] alpm.h: Add new event type, alpm_event_database_refresh_t

ivy.foster at gmail.com ivy.foster at gmail.com
Mon Jul 4 01:54:32 UTC 2016


From: Ivy Foster <ivy.foster at gmail.com>

New events of this type:
ALPM_EVENT_DATABASE_REFRESH_{START,DONE,FAILED}

Signed-off-by: Ivy Foster <ivy.foster at gmail.com>
---
 lib/libalpm/alpm.h | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 168d71b..2b3e116 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -465,7 +465,16 @@ typedef enum _alpm_event_type_t {
 	/** A hook is starting */
 	ALPM_EVENT_HOOK_RUN_START,
 	/** A hook has finished running */
-	ALPM_EVENT_HOOK_RUN_DONE
+	ALPM_EVENT_HOOK_RUN_DONE,
+	/** A database refresh has begun. See alpm_event_database_refresh_t 
+	* for arguments. */
+	ALPM_EVENT_DATABASE_REFRESH_START,
+	/** A database refresh has finished. See alpm_event_database_refresh_t 
+	* for arguments. */
+	ALPM_EVENT_DATABASE_REFRESH_DONE,
+	/** A database refresh has failed. See alpm_event_database_refresh_t 
+	* for arguments. */
+	ALPM_EVENT_DATABASE_REFRESH_FAILED
 } alpm_event_type_t;
 
 typedef struct _alpm_event_any_t {
@@ -527,6 +536,15 @@ typedef struct _alpm_event_database_missing_t {
 	const char *dbname;
 } alpm_event_database_missing_t;
 
+typedef struct _alpm_event_database_refresh_t {
+	/** Type of event */
+	alpm_event_type_t type;
+	/** Name of the database. */
+	const char *dbname;
+	/** File extention of the database. */
+	const char *dbext;
+} alpm_event_database_refresh_t;
+
 typedef struct _alpm_event_pkgdownload_t {
 	/** Type of event. */
 	alpm_event_type_t type;
@@ -589,6 +607,7 @@ typedef union _alpm_event_t {
 	alpm_event_delta_patch_t delta_patch;
 	alpm_event_scriptlet_info_t scriptlet_info;
 	alpm_event_database_missing_t database_missing;
+	alpm_event_database_refresh_t database_refresh;
 	alpm_event_pkgdownload_t pkgdownload;
 	alpm_event_pacnew_created_t pacnew_created;
 	alpm_event_pacsave_created_t pacsave_created;
-- 
2.9.0


More information about the pacman-dev mailing list