aboutsummaryrefslogtreecommitdiff
path: root/src/tool_metalink.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-05-25 19:24:32 +0900
committerDaniel Stenberg <daniel@haxx.se>2012-05-26 23:11:52 +0200
commit6a655ca192b65702f6c28b33e606fd4d6aec723f (patch)
tree5be5c0c9641d092513908d25654f48fb99a92bbc /src/tool_metalink.h
parent9f7f7925da648b3b39714e6c9fd65500a869bdfe (diff)
Minimize usage of structs from libmetalink
Diffstat (limited to 'src/tool_metalink.h')
-rw-r--r--src/tool_metalink.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
index 0c9d589eb..58bb3c439 100644
--- a/src/tool_metalink.h
+++ b/src/tool_metalink.h
@@ -25,26 +25,31 @@
#include <metalink/metalink_parser.h>
-#include "tool_cfgable.h"
+struct Configurable;
-struct metalinkfile {
- struct metalinkfile *next;
- metalink_file_t *file;
-};
-
-struct metalink {
- struct metalink *next;
- metalink_t* metalink;
-};
+typedef struct metalink_checksum {
+ struct metalink_checksum *next;
+ char *hash_name;
+ /* Hex-encoded hash value */
+ char *hash_value;
+} metalink_checksum;
-struct metalinkfile *new_metalinkfile(metalink_file_t *metalinkfile);
+typedef struct metalink_resource {
+ struct metalink_resource *next;
+ char *url;
+} metalink_resource;
-struct metalink *new_metalink(metalink_t *metalink);
+typedef struct metalinkfile {
+ struct metalinkfile *next;
+ char *filename;
+ metalink_checksum *checksum;
+ metalink_resource *resource;
+} metalinkfile;
/*
* Counts the resource in the metalinkfile.
*/
-int count_next_metalink_resource(struct metalinkfile *mlfile);
+int count_next_metalink_resource(metalinkfile *mlfile);
void clean_metalink(struct Configurable *config);
@@ -110,7 +115,7 @@ typedef struct {
* checksum.
*/
int metalink_check_hash(struct Configurable *config,
- struct metalinkfile *mlfile,
+ metalinkfile *mlfile,
const char *filename);
#endif /* HEADER_CURL_TOOL_METALINK_H */