libalpm
Arch Linux Package Manager Library
|
00001 /* 00002 * trans.h 00003 * 00004 * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org> 00005 * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org> 00006 * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com> 00007 * Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu> 00008 * Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 #ifndef _ALPM_TRANS_H 00024 #define _ALPM_TRANS_H 00025 00026 #include "alpm.h" 00027 00028 typedef enum _alpm_transstate_t { 00029 STATE_IDLE = 0, 00030 STATE_INITIALIZED, 00031 STATE_PREPARED, 00032 STATE_DOWNLOADING, 00033 STATE_COMMITING, 00034 STATE_COMMITED, 00035 STATE_INTERRUPTED 00036 } alpm_transstate_t; 00037 00038 /* Transaction */ 00039 struct __alpm_trans_t { 00040 alpm_transflag_t flags; 00041 alpm_transstate_t state; 00042 alpm_list_t *unresolvable; /* list of (alpm_pkg_t *) */ 00043 alpm_list_t *add; /* list of (alpm_pkg_t *) */ 00044 alpm_list_t *remove; /* list of (alpm_pkg_t *) */ 00045 alpm_list_t *skip_remove; /* list of (char *) */ 00046 }; 00047 00048 void _alpm_trans_free(alpm_trans_t *trans); 00049 int _alpm_trans_init(alpm_trans_t *trans, alpm_transflag_t flags); 00050 int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath, 00051 const char *script, const char *ver, const char *oldver, int is_archive); 00052 00053 #endif /* _ALPM_TRANS_H */ 00054 00055 /* vim: set ts=2 sw=2 noet: */