00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00021 #define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00022
00023 #include <debian-installer/package.h>
00024 #include <debian-installer/packages.h>
00025
00026 #include <stdbool.h>
00027
00028 typedef struct di_system_package di_system_package;
00029
00038 struct di_system_package
00039 {
00040 di_package p;
00041 int installer_menu_item;
00042 char *subarchitecture;
00043 char *kernel_version;
00044 };
00045
00046 void di_system_package_destroy (di_system_package *package);
00047
00048 di_packages *di_system_packages_alloc (void);
00049 di_packages_allocator *di_system_packages_allocator_alloc (void);
00050
00051 bool di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture);
00052
00053 extern const di_parser_fieldinfo *di_system_package_parser_fieldinfo[];
00054
00055 di_parser_info *di_system_package_parser_info (void);
00056 di_parser_info *di_system_packages_parser_info (void);
00057 di_parser_info *di_system_packages_status_parser_info (void);
00058
00065 static inline di_package *di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
00066 {
00067 return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
00068 }
00069
00076 static inline di_packages *di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
00077 {
00078 return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
00079 }
00080
00087 static inline di_packages *di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
00088 {
00089 return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
00090 }
00091
00098 static inline int di_system_packages_write_file (di_packages *packages, const char *file)
00099 {
00100 return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
00101 }
00102
00109 static inline int di_system_packages_status_write_file (di_packages *packages, const char *file)
00110 {
00111 return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
00112 }
00113
00114 di_slist *di_system_packages_resolve_dependencies_array_permissive (di_packages *packages, di_package **array, di_packages_allocator *allocator);
00115 void di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel);
00116
00118 #endif