Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.h')
-rw-r--r--lib/libalpm/trans.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index 2fcec2ed..8d5c6362 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -26,11 +26,21 @@
#include "alpm.h"
+typedef enum _pmtransstate_t {
+ STATE_IDLE = 0,
+ STATE_INITIALIZED,
+ STATE_PREPARED,
+ STATE_DOWNLOADING,
+ STATE_COMMITING,
+ STATE_COMMITED,
+ STATE_INTERRUPTED
+} pmtransstate_t;
+
/* Transaction */
struct __pmtrans_t {
- unsigned char type;
+ pmtranstype_t type;
unsigned int flags;
- unsigned char state;
+ pmtransstate_t state;
alpm_list_t *targets; /* alpm_list_t of (char *) */
alpm_list_t *packages; /* alpm_list_t of (pmpkg_t *) or (pmsyncpkg_t *) */
alpm_list_t *skiplist; /* alpm_list_t of (char *) */
@@ -39,16 +49,6 @@ struct __pmtrans_t {
alpm_trans_cb_progress cb_progress;
};
-enum {
- STATE_IDLE = 0,
- STATE_INITIALIZED,
- STATE_PREPARED,
- STATE_DOWNLOADING,
- STATE_COMMITING,
- STATE_COMMITED,
- STATE_INTERRUPTED
-};
-
#define FREETRANS(p) \
do { \
if(p) { \
@@ -77,7 +77,9 @@ do { \
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, alpm_trans_cb_progress progress);
+int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t 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, alpm_list_t **data);