Common definitions for Fetch and files that use it.
FetchStatus
Enumeration of possible Fetch completion statuses.
Definition fetch_common.h:30
void(* FetchLoaderProgressCallback)(const FetchProgress *progress, void *context)
Progress callback function type.
Definition fetch_loader.h:24
void fetch_loader_set_progress_callback(FetchLoader *instance, FetchLoaderProgressCallback callback)
Set the callback function for progress notifications.
Definition fetch_loader.c:231
void(* FetchLoaderStateCallback)(const char *message, void *context)
State callback function type.
Definition fetch_loader.h:32
void(* FetchLoaderDoneCallback)(FetchStatus status, void *context)
Done callback function type.
Definition fetch_loader.h:40
void fetch_loader_set_done_callback(FetchLoader *instance, FetchLoaderDoneCallback callback)
Set the callback function for completion notifications.
Definition fetch_loader.c:243
void fetch_loader_set_state_callback(FetchLoader *instance, FetchLoaderStateCallback callback)
Set the callback function for state notifications.
Definition fetch_loader.c:238
void fetch_loader_start(FetchLoader *instance, const char *remote_url, const char *file_path)
Start downloading a file.
Definition fetch_loader.c:204
void fetch_loader_set_callback_context(FetchLoader *instance, void *context)
Set the context for callback functions.
Definition fetch_loader.c:226
void fetch_loader_stop(FetchLoader *instance)
Request the download process to be stopped.
Definition fetch_loader.c:133
void fetch_loader_free(FetchLoader *instance)
Delete a FetchLoader instance.
Definition fetch_loader.c:120
FetchLoader * fetch_loader_alloc(void)
Create a FetchLoader instance.
Definition fetch_loader.c:104
Definition fetch_loader.c:14
Fetch download progress structure.
Definition fetch_common.h:20