get.h (456B)
1 /* get.h */ 2 3 #ifndef GET_H 4 #define GET_H 5 6 #include <stddef.h> 7 8 typedef struct Host { 9 char *name; 10 struct Host *next; 11 } Host; 12 13 typedef struct Domain { 14 char *url; 15 Host *hosts; 16 } Domain; 17 18 char *download_url(const char *url, char *error_msg, size_t err_size); 19 long get_remote_content_length(const char *url); 20 int contains_valid_hosts_entry(const char *content); 21 int save_to_hosts_file(const char *content, const char *url, int number); 22 23 #endif 24