libdebian-installer
release.h
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, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 #ifndef DEBIAN_INSTALLER__RELEASE_H
00021 #define DEBIAN_INSTALLER__RELEASE_H
00022 
00023 #include <debian-installer/hash.h>
00024 #include <debian-installer/parser.h>
00025 #include <debian-installer/slist.h>
00026 
00027 typedef struct di_release di_release;
00028 typedef struct di_release_file di_release_file;
00029 
00038 struct di_release
00039 {
00040   char *origin;                                 
00041   char *suite;                                  
00042   char *codename;                               
00043   di_hash_table *md5sum;                        
00044   di_mem_chunk *release_file_mem_chunk;         
00045 };
00046 
00050 struct di_release_file
00051 {
00052   union
00053   {
00054     char *filename;                             
00055     di_rstring key;                             
00056   };
00057   unsigned int size;                            
00058   char *sum[2];                                 
00059 };
00060 
00061 di_release *di_release_alloc (void);
00062 void di_release_free (di_release *packages);
00063 
00070 di_release *di_release_read_file (const char *file);
00071 
00074 di_parser_fields_function_read
00075   di_release_parser_read_file;
00076 
00082 extern const di_parser_fieldinfo *di_release_parser_fieldinfo[];
00083 
00085 #endif