From 6a655ca192b65702f6c28b33e606fd4d6aec723f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 25 May 2012 19:24:32 +0900 Subject: Minimize usage of structs from libmetalink --- src/tool_metalink.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/tool_metalink.h') 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 -#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 */ -- cgit v1.2.3