diff options
author | Mole Shang <[email protected]> | 2023-08-06 22:18:31 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2023-08-06 22:18:31 +0800 |
commit | 189fba5a4b63706575f9287cd0b1760a331d636e (patch) | |
tree | 40ed29ac9a5ac711dfeb9586e82e620da11fe1ef /src/process_url.h | |
parent | 99eded34e119d5b88d5210a617ecc35ba7347306 (diff) | |
download | hinata-189fba5a4b63706575f9287cd0b1760a331d636e.tar.gz hinata-189fba5a4b63706575f9287cd0b1760a331d636e.tar.bz2 hinata-189fba5a4b63706575f9287cd0b1760a331d636e.zip |
process_url: initial callback support
Diffstat (limited to 'src/process_url.h')
-rw-r--r-- | src/process_url.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/process_url.h b/src/process_url.h index 704fc42..53d8ed3 100644 --- a/src/process_url.h +++ b/src/process_url.h @@ -5,8 +5,8 @@ #include <limits.h> #include <stdbool.h> -#include "utils.h" #include "constants.h" +#include "utils.h" #define ERRTOSTRING(err) curl_easy_strerror(err) #define logerr(X) \ @@ -44,6 +44,13 @@ typedef struct str_data { size_t len; } str_data_t; +typedef struct callback_struct { + char *title; + const char *ext; +} callback_struct_t; + +typedef int (*callback_t)(callback_struct_t *); + void curl_init(); void curl_cleanup(status_t *); @@ -52,6 +59,7 @@ void poll_status(status_t *); int get(const char *, char **); -void add_url(const char *, const char *, const char *, const char *); +void add_url(const char *, const char *, const char *, const char *, callback_t, + callback_struct_t *); #endif |