2005-03-14 20:51:43 -05:00
|
|
|
/*
|
|
|
|
* conf.h
|
|
|
|
*
|
2006-01-02 14:55:35 -05:00
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
|
|
* USA.
|
|
|
|
*/
|
|
|
|
#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
|
|
|
char *configfile;
|
|
|
|
unsigned short op;
|
|
|
|
unsigned short verbose;
|
|
|
|
unsigned short version;
|
|
|
|
unsigned short help;
|
|
|
|
unsigned short upgrade;
|
|
|
|
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-08-21 21:28:05 -04:00
|
|
|
/* keep track if we had paths specified on command line */
|
|
|
|
unsigned short have_root;
|
|
|
|
unsigned short have_dbpath;
|
|
|
|
unsigned short have_logfile;
|
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;
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op_q_orphans;
|
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-05-31 15:48:16 -04:00
|
|
|
unsigned short op_q_test;
|
2007-02-04 03:26:52 -05:00
|
|
|
unsigned short op_q_upgrade;
|
2007-08-21 21:28:05 -04:00
|
|
|
|
2005-10-28 08:20:40 -04:00
|
|
|
unsigned short op_s_clean;
|
2006-10-15 15:34:52 -04:00
|
|
|
unsigned short op_s_dependsonly;
|
2005-10-28 08:20:40 -04:00
|
|
|
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;
|
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;
|
2006-10-15 15:34:52 -04:00
|
|
|
unsigned short noask;
|
|
|
|
unsigned int ask;
|
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 usecolor; /* enable colorful output */
|
|
|
|
unsigned short showsize; /* show individual package sizes */
|
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_ADD,
|
|
|
|
PM_OP_REMOVE,
|
|
|
|
PM_OP_UPGRADE,
|
|
|
|
PM_OP_QUERY,
|
|
|
|
PM_OP_SYNC,
|
|
|
|
PM_OP_DEPTEST
|
|
|
|
};
|
|
|
|
|
2005-11-07 08:14:19 -05:00
|
|
|
config_t *config_new(void);
|
2005-10-29 03:00:56 -04:00
|
|
|
int config_free(config_t *config);
|
2005-03-14 20:51:43 -05:00
|
|
|
|
|
|
|
#endif /* _PM_CONF_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|