summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.h
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-15 19:31:03 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-15 19:31:03 +0000
commitd37ad048732fbcef38aec001993553896dbe4198 (patch)
treec80472214aae0cd94c32ac00d613d38d51bc1adf /lib/libalpm/trans.h
parent83381bd21748d79f46247fab17877bc5c440a8de (diff)
downloadpacman-d37ad048732fbcef38aec001993553896dbe4198.tar.xz
Merged frugalware changes (too many to list). Also added some config file
handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
Diffstat (limited to 'lib/libalpm/trans.h')
-rw-r--r--lib/libalpm/trans.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index b60301c5..a0b72127 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -2,6 +2,9 @@
* trans.h
*
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
+ * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
+ * Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
+ * Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,8 +28,9 @@ enum {
STATE_IDLE = 0,
STATE_INITIALIZED,
STATE_PREPARED,
- STATE_COMMITTING,
- STATE_COMMITTED,
+ STATE_DOWNLOADING,
+ STATE_COMMITING,
+ STATE_COMMITED,
STATE_INTERRUPTED
};
@@ -41,6 +45,7 @@ typedef struct __pmtrans_t {
PMList *skiplist; /* PMList of (char *) */
alpm_trans_cb_event cb_event;
alpm_trans_cb_conv cb_conv;
+ alpm_trans_cb_progress cb_progress;
} pmtrans_t;
#define FREETRANS(p) \
@@ -62,10 +67,16 @@ do { \
(t)->cb_conv(q, d1, d2, d3, r); \
} \
} while(0)
+#define PROGRESS(t, e, p, per, h, r) \
+do { \
+ if((t) && (t)->cb_progress) { \
+ (t)->cb_progress(e, p, per, h, r); \
+ } \
+} while(0)
pmtrans_t *_alpm_trans_new(void);
void _alpm_trans_free(void *data);
-int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv);
+int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv, alpm_trans_cb_progress progress);
int _alpm_trans_sysupgrade(pmtrans_t *trans);
int _alpm_trans_addtarget(pmtrans_t *trans, char *target);
int _alpm_trans_prepare(pmtrans_t *trans, PMList **data);