tidying
This commit is contained in:
parent
ea14adca98
commit
7383308e0f
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "mount-http-dir",
|
||||
"name": "HTTPDirFs",
|
||||
"files": [ { "git": 1 } ]
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define FUSE_USE_VERSION 26
|
||||
#include <fuse.h>
|
||||
|
||||
/* Initialise fuse */
|
||||
int fuse_local_init(int argc, char **argv);
|
||||
|
||||
#endif
|
||||
|
|
4
link.c
4
link.c
|
@ -9,7 +9,6 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#define HTTP_OK 200
|
||||
#define HTTP_PARTIAL_CONTENT 206
|
||||
#define HTTP_RANGE_NOT_SATISFIABLE 416
|
||||
|
@ -83,8 +82,7 @@ static CURL *Link_to_curl(Link *link)
|
|||
}
|
||||
|
||||
/* set up some basic curl stuff */
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "httpdirfs - \
|
||||
https://github.com/fangfufu/httpdirfs");
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "HTTPDirFS");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||
/* for following directories without the '/' */
|
||||
|
|
1
link.h
1
link.h
|
@ -43,6 +43,7 @@ struct LinkTable {
|
|||
/** \brief root link table */
|
||||
extern LinkTable *ROOT_LINK_TBL;
|
||||
|
||||
/** \brief set the stats for a file */
|
||||
void Link_set_stat(Link* this_link, CURL *curl);
|
||||
|
||||
/** \brief create a new LinkTable */
|
||||
|
|
|
@ -24,15 +24,19 @@ typedef struct {
|
|||
/** \brief curl shared interface */
|
||||
extern CURLSH *curl_share;
|
||||
|
||||
/** \brief perform one transfer cycle */
|
||||
int curl_multi_perform_once();
|
||||
|
||||
/** \brief Initialise the network module */
|
||||
void network_init(const char *url);
|
||||
|
||||
/** \brief blocking file transfer */
|
||||
void transfer_blocking(CURL *curl);
|
||||
|
||||
/** \brief non blocking file transfer */
|
||||
void transfer_nonblocking(CURL *curl);
|
||||
|
||||
/** \brief callback function for file transfer */
|
||||
size_t
|
||||
WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp);
|
||||
|
||||
|
|
Loading…
Reference in New Issue