Di_release_parser

## Functions

di_release * | di_release_read_file (const char *file)

## Variables

const di_parser_fieldinfo * | di_release_parser_fieldinfo []
const di_parser_fieldinfo | internal_di_release_parser_field_origin
const di_parser_fieldinfo | internal_di_release_parser_field_suite
const di_parser_fieldinfo | internal_di_release_parser_field_codename
const di_parser_fieldinfo | internal_di_release_parser_field_md5sum
const di_parser_fieldinfo | internal_di_release_parser_field_sha256
const di_parser_fieldinfo * | di_release_parser_fieldinfo []

## Detailed Description

## Function Documentation

## di_release_read_file()

di_release* di_release_read_file | ( | const char * | file | ) |

Read a standard Release file

Parameters

  file | file to read

{
di_release *release;
di_parser_info *info;
release = di_release_alloc ();
info = di_parser_info_alloc ();
di_parser_info_add (info, di_release_parser_fieldinfo);
if (di_parser_rfc822_read_file (file, info, parser_new, NULL, release) < 0)
{
di_release_free (release);
return NULL;
}
return release;
}
di_parser_rfc822_read_file
int di_parser_rfc822_read_file(const char *file, di_parser_info *fieldinfo, di_parser_read_entry_new entry_new, di_parser_read_entry_finish entry_finish, void *user_data)
Definition: parser_rfc822.c:211
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 *release)
Definition: release.c:122
di_release_alloc
di_release * di_release_alloc(void)
Definition: release.c:108
di_parser_info
Parse info.
Definition: parser.h:94
di_release
Release file.
Definition: release.h:39

References di_release_alloc().

## Variable Documentation

## di_release_parser_fieldinfo [1/2]

const di_parser_fieldinfo* di_release_parser_fieldinfo[]

extern

Standard Release file

## di_release_parser_fieldinfo [2/2]

const di_parser_fieldinfo* di_release_parser_fieldinfo[]

Initial value:
=
{
&internal_di_release_parser_field_origin,
&internal_di_release_parser_field_suite,
&internal_di_release_parser_field_codename,
&internal_di_release_parser_field_md5sum,
&internal_di_release_parser_field_sha256,
NULL
}
internal_di_release_parser_field_origin
const di_parser_fieldinfo internal_di_release_parser_field_origin
Definition: release.c:40

Standard Release file

## internal_di_release_parser_field_codename

const di_parser_fieldinfo internal_di_release_parser_field_codename

Initial value:
=
DI_PARSER_FIELDINFO
(
"Codename",
di_parser_read_string,
NULL,
offsetof (di_release, codename)
)
DI_PARSER_FIELDINFO
#define DI_PARSER_FIELDINFO(name, read, write, integer)
Definition: parser.h:116
di_parser_read_string
di_parser_fields_function_read di_parser_read_string
Definition: parser.h:135

## internal_di_release_parser_field_md5sum

const di_parser_fieldinfo internal_di_release_parser_field_md5sum

Initial value:
=
DI_PARSER_FIELDINFO
(
"MD5Sum",
di_release_parser_read_file,
NULL,
0
)

## internal_di_release_parser_field_origin

const di_parser_fieldinfo internal_di_release_parser_field_origin

Initial value:
=
DI_PARSER_FIELDINFO
(
"Origin",
di_parser_read_string,
NULL,
offsetof (di_release, origin)
)

parser info

## internal_di_release_parser_field_sha256

const di_parser_fieldinfo internal_di_release_parser_field_sha256

Initial value:
=
DI_PARSER_FIELDINFO
(
"SHA256",
di_release_parser_read_file,
NULL,
1
)

## internal_di_release_parser_field_suite

const di_parser_fieldinfo internal_di_release_parser_field_suite

Initial value:
=
DI_PARSER_FIELDINFO
(
"Suite",
di_parser_read_string,
NULL,
offsetof (di_release, suite)
)