diff options
Diffstat (limited to 'src/pacman/conf.h')
-rw-r--r-- | src/pacman/conf.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h index 05ef0b4c..989fa2c8 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -1,8 +1,8 @@ /* * conf.h - * + * * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.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 * the Free Software Foundation; either version 2 of the License, or @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef _PM_CONF_H @@ -24,25 +24,36 @@ #include <alpm.h> typedef struct __config_t { - /* command line options */ - char *configfile; unsigned short op; + unsigned short quiet; unsigned short verbose; unsigned short version; unsigned short help; unsigned short upgrade; unsigned short noconfirm; unsigned short noprogressbar; - unsigned short op_d_resolve; + unsigned short logmask; + /* unfortunately, we have to keep track of paths both here and in the library + * because they can come from both the command line or config file, and we + * need to ensure we get the order of preference right. */ + char *configfile; + char *rootdir; + char *dbpath; + char *logfile; + /* TODO how to handle cachedirs? */ + unsigned short op_q_isfile; unsigned short op_q_info; unsigned short op_q_list; unsigned short op_q_foreign; unsigned short op_q_orphans; + unsigned short op_q_deps; + unsigned short op_q_explicit; unsigned short op_q_owns; unsigned short op_q_search; unsigned short op_q_changelog; unsigned short op_q_upgrade; + unsigned short op_s_clean; unsigned short op_s_dependsonly; unsigned short op_s_downloadonly; @@ -50,16 +61,35 @@ typedef struct __config_t { unsigned short op_s_sync; unsigned short op_s_search; unsigned short op_s_upgrade; + unsigned short group; pmtransflag_t flags; - unsigned short noask; - unsigned int ask; + + /* conf file options */ + unsigned short chomp; /* I Love Candy! */ + unsigned short usecolor; /* enable colorful output */ + unsigned short showsize; /* show individual package sizes */ + unsigned short totaldownload; /* When downloading, display the amount + downloaded, rate, ETA, and percent + downloaded of the total download list */ } config_t; -#define FREECONF(p) do { if(p) { config_free(p); p = NULL; } } while(0) +/* Operations */ +enum { + PM_OP_MAIN = 1, + PM_OP_ADD, + PM_OP_REMOVE, + PM_OP_UPGRADE, + PM_OP_QUERY, + PM_OP_SYNC, + PM_OP_DEPTEST +}; + +/* global config variable */ +extern config_t *config; config_t *config_new(void); -int config_free(config_t *config); +int config_free(config_t *oldconfig); #endif /* _PM_CONF_H */ |