mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-30 21:36:37 +08:00
* Old GitHub-based update function has been restored. * http:C path seems to be working as intended. * cURL path currently works to check for updates, but fails at the end with an AM error.
15 lines
860 B
C
15 lines
860 B
C
#pragma once
|
|
|
|
typedef struct http_context_s* http_context;
|
|
|
|
Result http_open(http_context* context, const char* url, bool userAgent);
|
|
Result http_open_ranged(http_context* context, const char* url, bool userAgent, u32 rangeStart, u32 rangeEnd);
|
|
Result http_close(http_context context);
|
|
Result http_get_size(http_context context, u32* size);
|
|
Result http_get_file_name(http_context context, char* out, u32 size);
|
|
Result http_read(http_context context, u32* bytesRead, void* buffer, u32 size);
|
|
|
|
Result http_download_callback(const char* url, u32 bufferSize, u64* contentLength, void* userData, Result (*callback)(void* userData, void* buffer, size_t size));
|
|
Result http_download_buffer(const char* url, u32* downloadedSize, void* buf, size_t size);
|
|
Result http_download_json(const char* url, json_t** json, size_t maxSize);
|
|
Result http_download_seed(u64 titleId); |