Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

packages.h

00001 /*
00002  * packages.h
00003  *
00004  * Copyright (C) 2003 Bastian Blank <waldi@debian.org>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019  *
00020  * $Id: packages.h,v 1.12 2004/01/17 14:44:16 waldi Exp $
00021  */
00022 
00023 #ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00024 #define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00025 
00026 #include <debian-installer/package.h>
00027 #include <debian-installer/packages.h>
00028 
00029 #include <stdbool.h>
00030 
00031 typedef struct di_system_package di_system_package;
00032 
00041 struct di_system_package
00042 {
00043   di_package p;                                         
00044   int installer_menu_item;                              
00045   char *subarchitecture;                                
00046 };
00047 
00048 void di_system_package_destroy (di_system_package *package);
00049 
00050 di_packages *di_system_packages_alloc (void);
00051 di_packages_allocator *di_system_packages_allocator_alloc (void);
00052 
00053 bool di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture);
00054 
00055 extern const di_parser_fieldinfo *di_system_package_parser_fieldinfo[];
00056 
00057 di_parser_info *di_system_package_parser_info (void);
00058 di_parser_info *di_system_packages_parser_info (void);
00059 di_parser_info *di_system_packages_status_parser_info (void);
00060 
00067 static inline di_package *di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
00068 {
00069   return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
00070 }
00071 
00078 static inline di_packages *di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
00079 {
00080   return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
00081 }
00082 
00089 static inline di_packages *di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
00090 {
00091   return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
00092 }
00093 
00100 static inline int di_system_packages_write_file (di_packages *packages, const char *file)
00101 {
00102   return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
00103 }
00104 
00111 static inline int di_system_packages_status_write_file (di_packages *packages, const char *file)
00112 {
00113   return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
00114 }
00115 
00117 #endif

Generated on Fri Feb 6 14:26:37 2004 for libdebian-installer by doxygen 1.3.5