summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg.h
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:14:31 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:14:31 (EST)
commit079a631d12f3d6ae6f33aef318a51799ea78027c (patch)
tree0c48f7f9ed23795ca62e92fa9007c3293810f938 /libopkg/opkg.h
parent5d73bb62ab80a03c0df9dcba12c5248567121dbd (diff)
opkg: add extra data to libopkg progress callbacks
git-svn-id: http://opkg.googlecode.com/svn/trunk@97 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg.h')
-rw-r--r--libopkg/opkg.h16
1 files changed, 15 insertions, 1 deletions
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);