libalpm
Arch Linux Package Manager Library
lib
libalpm
trans.h
Go to the documentation of this file.
1
/*
2
* trans.h
3
*
4
* Copyright (c) 2006-2024 Pacman Development Team <pacman-dev@lists.archlinux.org>
5
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
6
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
7
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
8
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
9
*
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
#ifndef ALPM_TRANS_H
24
#define ALPM_TRANS_H
25
26
#include "
alpm.h
"
27
28
typedef
enum
_alpm_transstate_t {
29
STATE_IDLE
= 0,
30
STATE_INITIALIZED
,
31
STATE_PREPARED
,
32
STATE_DOWNLOADING
,
33
STATE_COMMITING
,
34
STATE_COMMITED
,
35
STATE_INTERRUPTED
36
}
alpm_transstate_t
;
37
38
/* Transaction */
39
typedef
struct
_alpm_trans_t {
40
/* bitfield of alpm_transflag_t flags */
41
int
flags
;
42
alpm_transstate_t
state
;
43
alpm_list_t
*
unresolvable
;
/* list of (alpm_pkg_t *) */
44
alpm_list_t
*
add
;
/* list of (alpm_pkg_t *) */
45
alpm_list_t
*
remove
;
/* list of (alpm_pkg_t *) */
46
alpm_list_t
*
skip_remove
;
/* list of (char *) */
47
}
alpm_trans_t
;
48
49
void
_alpm_trans_free(
alpm_trans_t
*trans);
50
/* flags is a bitfield of alpm_transflag_t flags */
51
int
_alpm_trans_init(
alpm_trans_t
*trans,
int
flags);
52
int
_alpm_runscriptlet(alpm_handle_t *handle,
const
char
*filepath,
53
const
char
*script,
const
char
*ver,
const
char
*oldver,
int
is_archive);
54
55
#endif
/* ALPM_TRANS_H */
alpm.h
alpm_list_t
A doubly linked list.
Definition
alpm_list.h:51
alpm_trans_t::flags
int flags
Definition
trans.h:41
alpm_trans_t::unresolvable
alpm_list_t * unresolvable
Definition
trans.h:43
alpm_transstate_t
alpm_transstate_t
Definition
trans.h:28
STATE_INITIALIZED
@ STATE_INITIALIZED
Definition
trans.h:30
STATE_COMMITED
@ STATE_COMMITED
Definition
trans.h:34
STATE_INTERRUPTED
@ STATE_INTERRUPTED
Definition
trans.h:35
STATE_IDLE
@ STATE_IDLE
Definition
trans.h:29
STATE_COMMITING
@ STATE_COMMITING
Definition
trans.h:33
STATE_PREPARED
@ STATE_PREPARED
Definition
trans.h:31
STATE_DOWNLOADING
@ STATE_DOWNLOADING
Definition
trans.h:32
alpm_trans_t::remove
alpm_list_t * remove
Definition
trans.h:45
alpm_trans_t::state
alpm_transstate_t state
Definition
trans.h:42
alpm_trans_t::add
alpm_list_t * add
Definition
trans.h:44
alpm_trans_t::skip_remove
alpm_list_t * skip_remove
Definition
trans.h:46
alpm_trans_t
Definition
trans.h:39
Generated by
1.11.0