00001 /* 00002 * release.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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * $Id: release.h 29603 2005-07-31 16:10:46Z cjwatson $ 00021 */ 00022 00023 #ifndef DEBIAN_INSTALLER__RELEASE_H 00024 #define DEBIAN_INSTALLER__RELEASE_H 00025 00026 #include <debian-installer/hash.h> 00027 #include <debian-installer/parser.h> 00028 #include <debian-installer/slist.h> 00029 00030 typedef struct di_release di_release; 00031 typedef struct di_release_file di_release_file; 00032 00041 struct di_release 00042 { 00043 char *origin; 00044 char *suite; 00045 char *codename; 00046 di_hash_table *md5sum; 00047 di_mem_chunk *release_file_mem_chunk; 00048 }; 00049 00053 struct di_release_file 00054 { 00055 union 00056 { 00057 char *filename; 00058 di_rstring key; 00059 }; 00060 unsigned int size; 00061 char *sum; 00062 }; 00063 00064 di_release *di_release_alloc (void); 00065 void di_release_free (di_release *packages); 00066 00073 di_release *di_release_read_file (const char *file); 00074 00077 di_parser_fields_function_read 00078 di_release_parser_read_file; 00079 00085 extern const di_parser_fieldinfo *di_release_parser_fieldinfo[]; 00086 00088 #endif