summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg.h
diff options
context:
space:
mode:
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);