From 079a631d12f3d6ae6f33aef318a51799ea78027c Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:14:31 -0500 Subject: opkg: add extra data to libopkg progress callbacks git-svn-id: http://opkg.googlecode.com/svn/trunk@97 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg.h') diff --git a/libopkg/opkg.h b/libopkg/opkg.h index 4dda6c7..1295f51 100644 --- a/libopkg/opkg.h +++ b/libopkg/opkg.h @@ -17,10 +17,17 @@ typedef struct _opkg_t opkg_t; typedef struct _opkg_package_t opkg_package_t; +typedef struct _opkg_progress_data_t opkg_progress_data_t; -typedef void (*opkg_progress_callback_t) (opkg_t *opkg, int percentage, void *user_data); +typedef void (*opkg_progress_callback_t) (opkg_t *opkg, const opkg_progress_data_t *progress, void *user_data); typedef void (*opkg_package_callback_t) (opkg_t *opkg, opkg_package_t *package, void *user_data); +enum _opkg_action_t +{ + OPKG_INSTALL, + OPKG_REMOVE, + OPKG_DOWNLOAD +}; struct _opkg_package_t { @@ -33,6 +40,13 @@ struct _opkg_package_t int installed; }; +struct _opkg_progress_data_t +{ + int percentage; + int action; + opkg_package_t *package; +}; + opkg_package_t* opkg_package_new (); opkg_package_t* opkg_package_new_with_values (const char *name, const char *version, const char *arch, const char *desc, const char *tags, int installed); void opkg_package_free (opkg_package_t *package); -- cgit v0.9.1