libdebian-installer
system/packages.h
1/*
2 * packages.h
3 *
4 * Copyright (C) 2003 Bastian Blank <waldi@debian.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
21#define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
22
23#include <debian-installer/package.h>
24#include <debian-installer/packages.h>
25
26#include <stdbool.h>
27
29
39{
44};
45
46void di_system_package_destroy (di_system_package *package);
47
48di_packages *di_system_packages_alloc (void);
49di_packages_allocator *di_system_packages_allocator_alloc (void);
50
51bool di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture);
52
53extern const di_parser_fieldinfo *di_system_package_parser_fieldinfo[];
54
55di_parser_info *di_system_package_parser_info (void);
56di_parser_info *di_system_packages_parser_info (void);
57di_parser_info *di_system_packages_status_parser_info (void);
58
65static inline di_package *di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
66{
67 return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
68}
69
76static inline di_packages *di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
77{
78 return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
79}
80
87static inline di_packages *di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
88{
89 return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
90}
91
98static inline int di_system_packages_write_file (di_packages *packages, const char *file)
99{
100 return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
101}
102
109static inline int di_system_packages_status_write_file (di_packages *packages, const char *file)
110{
111 return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
112}
113
114di_slist *di_system_packages_resolve_dependencies_array_permissive (di_packages *packages, di_package **array, di_packages_allocator *allocator);
115void di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel);
116
118#endif
di_package * di_package_special_read_file(const char *file, di_packages *packages, di_packages_allocator *allocator, di_parser_info *(info)(void))
di_packages * di_packages_special_read_file(const char *file, di_packages_allocator *allocator, di_parser_info *(info)(void))
int di_packages_special_write_file(di_packages *packages, const char *file, di_parser_info *(info)(void))
static di_packages * di_system_packages_status_read_file(const char *file, di_packages_allocator *allocator)
Definition system/packages.h:87
static di_package * di_system_package_read_file(const char *file, di_packages *packages, di_packages_allocator *allocator)
Definition system/packages.h:65
static di_packages * di_system_packages_read_file(const char *file, di_packages_allocator *allocator)
Definition system/packages.h:76
static int di_system_packages_write_file(di_packages *packages, const char *file)
Definition system/packages.h:98
static int di_system_packages_status_write_file(di_packages *packages, const char *file)
Definition system/packages.h:109
Package.
Definition package.h:96
Packages file - Allocator.
Definition packages.h:53
Packages file.
Definition packages.h:42
Info about a parser field.
Definition parser.h:105
Parse info.
Definition parser.h:94
Single-linked list.
Definition slist.h:37
Package - System.
Definition system/packages.h:39
char * subarchitecture
Definition system/packages.h:42
char * kernel_version
Definition system/packages.h:43
int installer_menu_item
Definition system/packages.h:41
di_package p
Definition system/packages.h:40