From 986409f9bd7b84e63352b9ec1f825b0c917627a6 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 22 Nov 2006 09:03:41 +0000 Subject: * Completed getinfo api changes (pmmissing_t, pmtrans_t, etc) * Modified some dependancy checking * Changed "performing local database upgrade" message to be more clear * Change 'usize' to 'isize' in database files * Scriptlet output is now sent to pacman's log file * Limited some debugging output to be more clear --- lib/libalpm/trans.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 55d3cf7c..8def650f 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -226,4 +226,39 @@ int _alpm_trans_commit(pmtrans_t *trans, pmlist_t **data) return(0); } +unsigned char alpm_trans_get_type() +{ + /* Sanity checks */ + ASSERT(handle != NULL, return(-1)); + ASSERT(handle->trans != NULL, return(-1)); + + return handle->trans->type; +} + +unsigned int alpm_trans_get_flags() +{ + /* Sanity checks */ + ASSERT(handle != NULL, return(-1)); + ASSERT(handle->trans != NULL, return(-1)); + + return handle->trans->flags; +} + +pmlist_t * alpm_trans_get_targets() +{ + /* Sanity checks */ + ASSERT(handle != NULL, return(NULL)); + ASSERT(handle->trans != NULL, return(NULL)); + + return handle->trans->targets; +} + +pmlist_t * alpm_trans_get_packages() +{ + /* Sanity checks */ + ASSERT(handle != NULL, return(NULL)); + ASSERT(handle->trans != NULL, return(NULL)); + + return handle->trans->packages; +} /* vim: set ts=2 sw=2 noet: */ -- cgit v1.2.3-24-g4f1b