adjusted includes

This commit is contained in:
Fufu Fang 2021-09-03 21:39:31 +01:00
parent 6819ad09e4
commit 939e287c87
9 changed files with 54 additions and 51 deletions

View File

@ -1,8 +1,8 @@
#include "cache.h"
#include "config.h"
#include "util.h"
#include "log.h"
#include "util.h"
#include <sys/stat.h>

View File

@ -9,16 +9,14 @@
* separate folders.
*/
#include <stdio.h>
#include <stdint.h>
#include <pthread.h>
/**
* \brief cache data type
*/
typedef struct Cache Cache;
#include "link.h"
#include "network.h"
#include <stdio.h>
#include <stdint.h>
#include <pthread.h>
/**
* \brief Type definition for a cache segment

View File

@ -1,8 +1,7 @@
#include "link.h"
#include "util.h"
#include "network.h"
#include "log.h"
#include "util.h"
#include <gumbo.h>

View File

@ -8,11 +8,12 @@
typedef struct Link Link;
typedef struct LinkTable LinkTable;
typedef struct TransferStruct TransferStruct;
#include "config.h"
#include "sonic.h"
#include "cache.h"
#include "config.h"
#include "network.h"
#include "sonic.h"
#include <curl/curl.h>
/**
@ -26,34 +27,6 @@ typedef enum {
LINK_UNINITIALISED_FILE = 'U'
} LinkType;
/**
* \brief specify the type of data transfer
*/
typedef enum {
FILESTAT = 's',
DATA = 'd'
} TransferType;
/**
* \brief For storing transfer data and metadata
*/
struct TransferStruct {
/** \brief The array to store the data */
char *data;
/** \brief The current size of the array */
size_t curr_size;
/** \brief The type of transfer being done */
TransferType type;
/** \brief Whether transfer is in progress */
volatile int transferring;
/** \brief The link associated with the transfer */
Link *link;
/** \brief The minium requested size */
size_t min_req_size;
/** \brief Whether we have sent off the minimally requested data*/
int min_data_sent;
};
/**
* \brief link table type
* \details index 0 contains the Link for the base URL

View File

@ -1,8 +1,7 @@
#include "util.h"
#include "link.h"
#include "fuse_local.h"
#include "network.h"
#include "link.h"
#include "log.h"
#include "util.h"
#include <getopt.h>
#include <stdlib.h>

View File

@ -1,7 +1,7 @@
#include "network.h"
#include "util.h"
#include "log.h"
#include "util.h"
#include <openssl/crypto.h>

View File

@ -6,8 +6,40 @@
* \brief network related functions
*/
typedef struct TransferStruct TransferStruct;
#include "link.h"
#include <curl/curl.h>
/**
* \brief specify the type of data transfer
*/
typedef enum {
FILESTAT = 's',
DATA = 'd'
} TransferType;
/**
* \brief For storing transfer data and metadata
*/
struct TransferStruct {
/** \brief The array to store the data */
char *data;
/** \brief The current size of the array */
size_t curr_size;
/** \brief The type of transfer being done */
TransferType type;
/** \brief Whether transfer is in progress */
volatile int transferring;
/** \brief The link associated with the transfer */
Link *link;
/** \brief The minium requested size */
size_t min_req_size;
/** \brief Whether we have sent off the minimally requested data*/
int min_data_sent;
};
/** \brief HTTP response codes */
typedef enum {
HTTP_OK = 200,

View File

@ -1,10 +1,10 @@
#include "sonic.h"
#include "config.h"
#include "util.h"
#include "link.h"
#include "network.h"
#include "log.h"
#include "link.h"
#include "util.h"
#include <expat.h>

View File

@ -1,15 +1,17 @@
#include "config.h"
#include "util.h"
#include "config.h"
#include "log.h"
#include <openssl/md5.h>
#include <uuid/uuid.h>
#include <errno.h>
#include <execinfo.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
/**
* \brief Backtrace buffer size