2005-03-14 20:51:43 -05:00
|
|
|
/*
|
|
|
|
* conf.h
|
2007-11-16 21:18:45 -05:00
|
|
|
*
|
2009-07-01 03:08:33 -04:00
|
|
|
* Copyright (c) 2006-2009 Pacman Development Team <pacman-dev@archlinux.org>
|
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
2007-11-16 21:18:45 -05:00
|
|
|
*
|
2005-03-14 20:51:43 -05:00
|
|
|
* 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
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-12-10 23:55:22 -05:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-03-14 20:51:43 -05:00
|
|
|
*/
|
|
|
|
#ifndef _PM_CONF_H
|
|
|
|
#define _PM_CONF_H
|
|
|
|
|
2007-01-19 04:28:44 -05:00
|
|
|
#include <alpm.h>
|
|
|
|
|
2005-10-29 03:00:56 -04:00
|
|
|
typedef struct __config_t {
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op;
|
2007-11-07 02:05:33 -05:00
|
|
|
unsigned short quiet;
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short verbose;
|
|
|
|
unsigned short version;
|
|
|
|
unsigned short help;
|
|
|
|
unsigned short noconfirm;
|
2006-01-28 00:07:50 -05:00
|
|
|
unsigned short noprogressbar;
|
2007-06-07 15:42:26 -04:00
|
|
|
unsigned short logmask;
|
2007-12-02 13:20:55 -05:00
|
|
|
/* 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? */
|
2007-06-07 15:42:26 -04:00
|
|
|
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op_q_isfile;
|
|
|
|
unsigned short op_q_info;
|
|
|
|
unsigned short op_q_list;
|
2005-12-13 21:23:14 -05:00
|
|
|
unsigned short op_q_foreign;
|
2008-01-10 09:59:43 -05:00
|
|
|
unsigned short op_q_unrequired;
|
2007-07-14 18:44:06 -04:00
|
|
|
unsigned short op_q_deps;
|
|
|
|
unsigned short op_q_explicit;
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op_q_owns;
|
|
|
|
unsigned short op_q_search;
|
2006-10-15 15:34:52 -04:00
|
|
|
unsigned short op_q_changelog;
|
2007-02-04 03:26:52 -05:00
|
|
|
unsigned short op_q_upgrade;
|
2009-03-30 12:48:15 -04:00
|
|
|
unsigned short op_q_check;
|
2007-08-21 21:28:05 -04:00
|
|
|
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op_s_clean;
|
|
|
|
unsigned short op_s_downloadonly;
|
|
|
|
unsigned short op_s_info;
|
|
|
|
unsigned short op_s_sync;
|
|
|
|
unsigned short op_s_search;
|
|
|
|
unsigned short op_s_upgrade;
|
2008-08-17 13:23:12 -04:00
|
|
|
unsigned short op_s_printuris;
|
2007-08-21 21:28:05 -04:00
|
|
|
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short group;
|
2007-03-05 20:21:41 -05:00
|
|
|
pmtransflag_t flags;
|
2007-08-21 21:28:05 -04:00
|
|
|
|
2007-06-04 12:12:13 -04:00
|
|
|
/* conf file options */
|
|
|
|
unsigned short chomp; /* I Love Candy! */
|
|
|
|
unsigned short showsize; /* show individual package sizes */
|
2008-02-16 10:01:13 -05:00
|
|
|
/* When downloading, display the amount downloaded, rate, ETA, and percent
|
|
|
|
* downloaded of the total download list */
|
|
|
|
unsigned short totaldownload;
|
|
|
|
unsigned short cleanmethod; /* select -Sc behavior */
|
2008-08-24 17:24:53 -04:00
|
|
|
alpm_list_t *holdpkg;
|
2008-01-28 13:49:27 -05:00
|
|
|
alpm_list_t *syncfirst;
|
2005-10-29 03:00:56 -04:00
|
|
|
} config_t;
|
2005-10-28 08:20:40 -04:00
|
|
|
|
2007-06-07 22:20:40 -04:00
|
|
|
/* Operations */
|
|
|
|
enum {
|
|
|
|
PM_OP_MAIN = 1,
|
|
|
|
PM_OP_REMOVE,
|
|
|
|
PM_OP_UPGRADE,
|
|
|
|
PM_OP_QUERY,
|
|
|
|
PM_OP_SYNC,
|
|
|
|
PM_OP_DEPTEST
|
|
|
|
};
|
|
|
|
|
2008-02-16 10:01:13 -05:00
|
|
|
/* clean method */
|
|
|
|
enum {
|
|
|
|
PM_CLEAN_KEEPINST = 0, /* default */
|
|
|
|
PM_CLEAN_KEEPCUR
|
|
|
|
};
|
|
|
|
|
2007-11-04 13:05:22 -05:00
|
|
|
/* global config variable */
|
|
|
|
extern config_t *config;
|
|
|
|
|
2005-11-07 08:14:19 -05:00
|
|
|
config_t *config_new(void);
|
2007-09-10 20:13:38 -04:00
|
|
|
int config_free(config_t *oldconfig);
|
2005-03-14 20:51:43 -05:00
|
|
|
|
|
|
|
#endif /* _PM_CONF_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|