diff options
| author | 2023-12-28 06:40:07 -0600 | |
|---|---|---|
| committer | 2023-12-28 06:40:07 -0600 | |
| commit | cfe01c9f8b7ac0d82e694323b60fc172e0c35a48 (patch) | |
| tree | 6f02144b38fcb2a4c5116e412f9ed4b0cc711728 /src/l2su.h | |
| parent | add cheap SHA1 implementation (diff) | |
[wip] version stuff
Diffstat (limited to 'src/l2su.h')
| -rw-r--r-- | src/l2su.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -3,8 +3,11 @@ #include "command.h" #include "instance.h" +#include "version.h" #include <fcntl.h> +#include <time.h> +#include <curl/curl.h> 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 */ |
