mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
17 lines
1.1 KiB
C
17 lines
1.1 KiB
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, void* userData, Result (*callback)(void* userData, void* buffer, size_t size),
|
|
Result (*checkRunning)(void* userData),
|
|
Result (*progress)(void* userData, u64 total, u64 curr));
|
|
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); |