From cfe01c9f8b7ac0d82e694323b60fc172e0c35a48 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Thu, 28 Dec 2023 06:40:07 -0600 Subject: [wip] version stuff --- src/l2su.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/l2su.h') diff --git a/src/l2su.h b/src/l2su.h index 1746a53..520c756 100644 --- a/src/l2su.h +++ b/src/l2su.h @@ -3,8 +3,11 @@ #include "command.h" #include "instance.h" +#include "version.h" #include +#include +#include struct l2_user_paths { const char *config; @@ -18,6 +21,9 @@ struct tag_l2_state_t { * but for now a doubly-linked list accomplishes our goals */ struct l2_instance *instance_head; struct l2_instance *instance_tail; + + struct l2_version_remote *ver_remote_head; + struct l2_version_remote *ver_remote_tail; }; extern struct tag_l2_state_t l2_state; @@ -33,4 +39,20 @@ int l2_launcher_open_config(const char *path, int flags, mode_t mode); int l2_launcher_mkdir_parents(const char *path); +char *l2_launcher_parse_iso_time(const char *str, struct tm *ts); + +struct l2_dlbuf { + void *data; + size_t size; + size_t capacity; +}; + +void l2_launcher_download_init(struct l2_dlbuf *buf); +void *l2_launcher_download_finalize(struct l2_dlbuf *buf, size_t *psz); +void l2_launcher_download_cleanup(struct l2_dlbuf *buf); +//extern size_t (*const l2_dlcb)(char *, size_t, size_t, void *); +extern const curl_write_callback l2_dlcb; + +int l2_launcher_download(CURL *cd, const char *url, void **odata, size_t *osize); + #endif /* include guard */ -- cgit v1.2.3-70-g09d2