2020-07-05 11:21:20 -04:00
|
|
|
#ifndef TOOLS_HTTP_DOWNLOAD_H
|
|
|
|
#define TOOLS_HTTP_DOWNLOAD_H
|
|
|
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
typedef struct prof_win_t ProfWin;
|
|
|
|
|
2020-07-20 07:01:05 -04:00
|
|
|
typedef struct http_download_t
|
|
|
|
{
|
2023-03-09 15:16:42 -05:00
|
|
|
char* id;
|
2020-07-20 07:01:05 -04:00
|
|
|
char* url;
|
|
|
|
char* filename;
|
|
|
|
char* directory;
|
|
|
|
FILE* filehandle;
|
2020-07-05 11:21:20 -04:00
|
|
|
curl_off_t bytes_received;
|
2020-07-20 07:01:05 -04:00
|
|
|
ProfWin* window;
|
2020-07-05 11:21:20 -04:00
|
|
|
pthread_t worker;
|
|
|
|
int cancel;
|
|
|
|
} HTTPDownload;
|
|
|
|
|
2020-12-04 10:13:13 -05:00
|
|
|
void*
|
|
|
|
http_file_get(void* userdata)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void http_download_cancel_processes(){};
|
|
|
|
void http_download_add_download(){};
|
|
|
|
|
2020-07-05 11:21:20 -04:00
|
|
|
#endif
|