release.h
/*
* release.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__RELEASE_H
#define DEBIAN_INSTALLER__RELEASE_H
#include <debian-installer/hash.h>
#include <debian-installer/parser.h>
#include <debian-installer/slist.h>
typedef struct di_release di_release;
typedef struct di_release_file di_release_file;
struct di_release
{
char *origin;
char *suite;
char *codename;
di_hash_table *sha256;
di_mem_chunk *release_file_mem_chunk;
};
struct di_release_file
{
union
{
char *filename;
di_rstring key;
};
unsigned int size;
char *sum[2];
};
di_release *di_release_alloc (void);
void di_release_free (di_release *packages);
di_release *di_release_read_file (const char *file);
di_parser_fields_function_read
di_release_parser_read_file;
extern const di_parser_fieldinfo *di_release_parser_fieldinfo[];
#endif
di_parser_fields_function_read
void di_parser_fields_function_read(void **data, const di_parser_fieldinfo *fip, di_rstring *field_modifier, di_rstring *value, void *user_data)
Definition parser.h:49
di_release_read_file
di_release * di_release_read_file(const char *file)
Definition release.c:142
di_release_parser_fieldinfo
const di_parser_fieldinfo * di_release_parser_fieldinfo[]
Definition release.c:84
di_release_free
void di_release_free(di_release *packages)
Definition release.c:122
di_release_alloc
di_release * di_release_alloc(void)
Definition release.c:108
di_hash_table
Hash table.
Definition hash.c:42
di_mem_chunk
a mem chunk
Definition mem_chunk.c:47
di_parser_fieldinfo
Info about a parser field.
Definition parser.h:105
di_release_file
Release file - file entry.
Definition release.h:51
di_release_file::sum
char * sum[2]
Definition release.h:58
di_release_file::size
unsigned int size
Definition release.h:57
di_release_file::filename
char * filename
Definition release.h:54
di_release_file::key
di_rstring key
Definition release.h:55
di_release
Release file.
Definition release.h:39
di_release::origin
char * origin
Definition release.h:40
di_release::release_file_mem_chunk
di_mem_chunk * release_file_mem_chunk
Definition release.h:44
di_release::suite
char * suite
Definition release.h:41
di_release::codename
char * codename
Definition release.h:42
di_release::sha256
di_hash_table * sha256
Definition release.h:43
di_rstring
raw string
Definition string.h:38