Fix stubs and move some tests to http_common

This commit is contained in:
William Wennerström
2020-07-21 13:11:50 +02:00
parent be62b446f7
commit 1bb6cecee6
10 changed files with 23 additions and 48 deletions

View File

@@ -8,7 +8,7 @@
#include "config.h"
#include "tools/http_download.h"
#include "tools/http_common.c"
typedef struct
{

View File

@@ -15,9 +15,13 @@ typedef struct aesgcm_download_t
HTTPDownload* http_dl;
} AESGCMDownload;
void* aesgcm_file_get(void* userdata);
void*
aesgcm_file_get(void* userdata)
{
return NULL;
};
void aesgcm_download_cancel_processes(ProfWin* window);
void aesgcm_download_add_download(AESGCMDownload* download);
void aesgcm_download_cancel_processes(ProfWin* window){};
void aesgcm_download_add_download(AESGCMDownload* download){};
#endif

View File

@@ -1,16 +0,0 @@
#ifndef TOOLS_HTTP_COMMON_H
#define TOOLS_HTTP_COMMON_H
typedef struct prof_win_t ProfWin;
char*
http_basename_from_url(const char* url)
{
return "";
}
void http_print_transfer(ProfWin* window, char* url, const char* fmt, ...);
void http_print_transfer_update(ProfWin* window, char* url,
const char* fmt, ...);
#endif

View File

@@ -18,9 +18,4 @@ typedef struct http_download_t
int cancel;
} HTTPDownload;
void* http_file_get(void* userdata);
void http_download_cancel_processes(ProfWin* window);
void http_download_add_download(HTTPDownload* download);
#endif

View File

@@ -20,8 +20,6 @@ typedef struct http_upload_t
int cancel;
} HTTPUpload;
//GSList *upload_processes;
void*
http_file_put(void* userdata)
{
@@ -33,6 +31,7 @@ file_mime_type(const char* const file_name)
{
return NULL;
}
off_t
file_size(const char* const file_name)
{

View File

@@ -38,7 +38,7 @@
#include "test_form.h"
#include "test_callbacks.h"
#include "test_plugins_disco.h"
#include "test_http_download.h"
#include "test_http_common.h"
int
main(int argc, char* argv[])