1METALINK_FILE_T(3)            libmetalink Manual            METALINK_FILE_T(3)
2
3
4

NAME

6       metalink_file_t  -  The  structure  that  holds information of a single
7       file.
8
9

SYNOPSIS

11       #include <metalink/metalink_types.h>
12
13

DESCRIPTION

15       metalink_file_t is a structure that holds information of a single file.
16       It  contains array of URLs(metalink_resource_t(3)), checksums and meta‐
17       data for a file.
18
19

STRUCTURE MEMBERS

21       char *name;
22       long long int size;
23       char *version;
24       char *language;
25       char *os;
26       metalink_resource_t **resources;
27       int maxconnections;
28       metalink_checksum_t **checksums;
29       metalink_chunk_checksum_t *chunk_checksum;
30
31
32   name
33       Null terminated file name of the resource  which  corresponds  to  name
34       element in Metalink XML file.
35
36
37   size
38       Length of the resource in bytes.
39
40
41   version
42       Null  terminated version string which corresponds to version element in
43       Metalink XML file.
44
45
46   language
47       Null terminated language string which corresponds to  language  element
48       in Metalink XML file.
49
50
51   os
52       Null  terminated  os string which corresponds to os element in Metalink
53       XML file.
54
55
56   resources
57       Null terminated array of pointer of  metalink_resource_t(3)  structure.
58       This  corresponds to resources element in Metalink XML file.  Each met‐
59       alink_resource_t(3) structure corresponds to url  element  in  Metalink
60       XML file.
61
62
63   maxconnections
64       This  is  a  value  of  maxconnections attribute of file element.  This
65       value is usually used for upper limit of concurrent connections for the
66       resource.
67
68
69   checksums
70       Null  terminated  array of pointer of metalink_checksum_t(3) structure.
71       This field is an array because in Metalink specification,  verification
72       element  can  contain  multiple  hash  elements.   Each metalink_check‐
73       sum_t(3) structure corresponds to hash element in Metalink XML file.
74
75
76   chunk_checksum
77       The chunk checksum(aka piece hash) for the resource.  This  corresponds
78       to pieces element under verification element in Metalink XML file.
79
80

SEE ALSO

82       metalink_checksum_t(3),        metalink_chunk_checksum_t(3),       met‐
83       alink_resource_t(3), metalink_parse_file(3)
84
85
86
87libmetalink 0.0.3                 10/25/2008                METALINK_FILE_T(3)
Impressum