system/packages.h
/*
* packages.h
*
* Copyright (C) 2003 Bastian Blank <waldi@debian.org>
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
#define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
#include <debian-installer/package.h>
#include <debian-installer/packages.h>
#include <stdbool.h>
typedef struct di_system_package di_system_package;
struct di_system_package
{
di_package p;
int installer_menu_item;
char *subarchitecture;
char *kernel_version;
};
void di_system_package_destroy (di_system_package *package);
di_packages *di_system_packages_alloc (void);
di_packages_allocator *di_system_packages_allocator_alloc (void);
bool di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture);
extern const di_parser_fieldinfo *di_system_package_parser_fieldinfo[];
di_parser_info *di_system_package_parser_info (void);
di_parser_info *di_system_packages_parser_info (void);
di_parser_info *di_system_packages_status_parser_info (void);
static inline di_package *di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
{
return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
}
static inline di_packages *di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
{
return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
}
static inline di_packages *di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
{
return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
}
static inline int di_system_packages_write_file (di_packages *packages, const char *file)
{
return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
}
static inline int di_system_packages_status_write_file (di_packages *packages, const char *file)
{
return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
}
di_slist *di_system_packages_resolve_dependencies_array_permissive (di_packages *packages, di_package **array, di_packages_allocator *allocator);
void di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel);
#endif
di_package_special_read_file
di_package * di_package_special_read_file(const char *file, di_packages *packages, di_packages_allocator *allocator, di_parser_info *(info)(void))
di_packages_special_read_file
di_packages * di_packages_special_read_file(const char *file, di_packages_allocator *allocator, di_parser_info *(info)(void))
di_packages_special_write_file
int di_packages_special_write_file(di_packages *packages, const char *file, di_parser_info *(info)(void))
di_system_packages_status_read_file
static di_packages * di_system_packages_status_read_file(const char *file, di_packages_allocator *allocator)
Definition system/packages.h:87
di_system_package_read_file
static di_package * di_system_package_read_file(const char *file, di_packages *packages, di_packages_allocator *allocator)
Definition system/packages.h:65
di_system_packages_read_file
static di_packages * di_system_packages_read_file(const char *file, di_packages_allocator *allocator)
Definition system/packages.h:76
di_system_packages_write_file
static int di_system_packages_write_file(di_packages *packages, const char *file)
Definition system/packages.h:98
di_system_packages_status_write_file
static int di_system_packages_status_write_file(di_packages *packages, const char *file)
Definition system/packages.h:109
di_package
Package.
Definition package.h:96
di_packages_allocator
Packages file - Allocator.
Definition packages.h:53
di_packages
Packages file.
Definition packages.h:42
di_parser_fieldinfo
Info about a parser field.
Definition parser.h:105
di_parser_info
Parse info.
Definition parser.h:94
di_slist
Single-linked list.
Definition slist.h:37
di_system_package
Package - System.
Definition system/packages.h:39
di_system_package::subarchitecture
char * subarchitecture
Definition system/packages.h:42
di_system_package::kernel_version
char * kernel_version
Definition system/packages.h:43
di_system_package::installer_menu_item
int installer_menu_item
Definition system/packages.h:41
di_system_package::p
di_package p
Definition system/packages.h:40