mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 21:24:28 -08:00
add test with iwyu and fix all headers accordingly
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MFSHELL_MFAPI_H_
|
||||
#define _MFSHELL_FILE_INFO_H_
|
||||
#ifndef _MFAPI_APICALLS_H_
|
||||
#define _MFAPI_APICALLS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -18,18 +18,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <jansson.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../file.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_file_get_info(mfhttp *conn, void *data);
|
||||
|
||||
@@ -18,18 +18,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <jansson.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../file.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_file_get_links(mfhttp *conn, void *data);
|
||||
|
||||
@@ -20,14 +20,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
int
|
||||
mfconn_api_folder_create(mfconn *conn,char *parent,char *name)
|
||||
|
||||
@@ -18,19 +18,16 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../folder.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../folder.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_folder_get_content_folders(mfhttp *conn, void *data);
|
||||
|
||||
@@ -18,19 +18,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <jansson.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../folder.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../folder.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_folder_get_info(mfhttp *conn, void *data);
|
||||
|
||||
@@ -18,18 +18,13 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_user_get_info(mfhttp *conn, void *data);
|
||||
|
||||
@@ -18,18 +18,17 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <jansson.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../apicalls.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../../utils/http.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../../utils/json.h"
|
||||
#include "../../utils/strings.h"
|
||||
#include "../mfconn.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
static int
|
||||
_decode_get_session_token(mfhttp *conn, void *data);
|
||||
|
||||
25
mfapi/file.c
25
mfapi/file.c
@@ -18,13 +18,19 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../utils/http.h"
|
||||
#include "../utils/strings.h"
|
||||
#include "file.h"
|
||||
|
||||
struct _file_s
|
||||
|
||||
struct mffile
|
||||
{
|
||||
char quickkey[18];
|
||||
char hash[65];
|
||||
@@ -206,21 +212,6 @@ file_get_onetime_link(mffile *file)
|
||||
return file->onetime_link;
|
||||
}
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "mfconn.h"
|
||||
#include "../utils/http.h"
|
||||
#include "../utils/strings.h"
|
||||
|
||||
ssize_t
|
||||
file_download_direct(mffile *file, char *local_dir)
|
||||
{
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#ifndef __MFAPI_FILE_H__
|
||||
#define __MFAPI_FILE_H__
|
||||
|
||||
typedef struct _file_s mffile;
|
||||
#include <sys/types.h>
|
||||
|
||||
struct _file_s;
|
||||
typedef struct mffile mffile;
|
||||
|
||||
mffile* file_alloc(void);
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "folder.h"
|
||||
|
||||
struct _folder_s
|
||||
struct mffolder
|
||||
{
|
||||
char folderkey[20];
|
||||
char name[41];
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#ifndef __MFAPI_FOLDER_H__
|
||||
#define __MFAPI_FOLDER_H__
|
||||
|
||||
typedef struct _folder_s mffolder;
|
||||
|
||||
struct _folder_s;
|
||||
typedef struct mffolder mffolder;
|
||||
|
||||
mffolder* folder_alloc(void);
|
||||
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/md5.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../utils/strings.h"
|
||||
#include "mfconn.h"
|
||||
#include "apicalls.h"
|
||||
#include "mfconn.h"
|
||||
|
||||
struct mfconn
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define __MFAPI_MFCONN_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "file.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user