mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
advio: add some missing includes
This commit is contained in:
parent
f359bc230b
commit
7beb874020
2 changed files with 30 additions and 9 deletions
|
@ -31,6 +31,11 @@
|
|||
struct advio {
|
||||
CURL *curl;
|
||||
FILE *file;
|
||||
|
||||
long uploaded; /**< Upload progress. How much has already been uploaded to the remote file. */
|
||||
long downloaded; /**< Download progress. How much has already been downloaded from the remote file. */
|
||||
|
||||
int completed:1; /**< Was the upload completd */
|
||||
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
|
||||
|
@ -43,10 +48,13 @@ typedef struct advio AFILE;
|
|||
/* The remaining functions from stdio are just replaced macros */
|
||||
#define afeof(af) feof((af)->file)
|
||||
#define aftell(af) ftell((af)->file)
|
||||
#define arewind(af) rewind((af)->file)
|
||||
#define afileno(af) fileno((af)->file)
|
||||
#define afread(ptr, sz, nitems, af) fread(ptr, sz, nitems, (af)->file)
|
||||
#define afwrite(ptr, sz, nitems, af) fwrite(ptr, sz, nitems, (af)->file)
|
||||
#define afputs(ptr, af) fputs(ptr, (af)->file)
|
||||
#define afprintf(af, fmt, ...) fprintf((af)->file, fmt, __VA_ARGS__)
|
||||
#define afscanf(af, fmt, ...) fprintf((af)->file, fmt, __VA_ARGS__)
|
||||
#define agetline(linep, linecapp, af) getline(linep, linecapp, (af)->file)
|
||||
|
||||
/* Extensions */
|
||||
#define auri(af) ((af)->uri)
|
||||
|
@ -55,6 +63,18 @@ typedef struct advio AFILE;
|
|||
AFILE *afopen(const char *url, const char *mode);
|
||||
|
||||
int afclose(AFILE *file);
|
||||
|
||||
int afflush(AFILE *file);
|
||||
int adownload(AFILE *af);
|
||||
int aupload(AFILE *af);
|
||||
|
||||
int afseek(AFILE *file, long offset, int origin);
|
||||
|
||||
void arewind(AFILE *file);
|
||||
|
||||
/** Download contens from remote file
|
||||
*
|
||||
*
|
||||
* @param resume Do a partial download and append to the local file
|
||||
*/
|
||||
int adownload(AFILE *af, int resume);
|
||||
|
||||
int aupload(AFILE *af, int resume);
|
||||
|
|
|
@ -66,14 +66,15 @@ enum log_facilities {
|
|||
LOG_XIL = (1L << 20),
|
||||
LOG_TC = (1L << 21),
|
||||
LOG_IF = (1L << 22),
|
||||
LOG_ADVIO = (1L << 23),
|
||||
|
||||
/* Node-types */
|
||||
LOG_SOCKET = (1L << 23),
|
||||
LOG_FILE = (1L << 24),
|
||||
LOG_FPGA = (1L << 25),
|
||||
LOG_NGSI = (1L << 26),
|
||||
LOG_WEBSOCKET = (1L << 27),
|
||||
LOG_OPAL = (1L << 28),
|
||||
LOG_SOCKET = (1L << 24),
|
||||
LOG_FILE = (1L << 25),
|
||||
LOG_FPGA = (1L << 26),
|
||||
LOG_NGSI = (1L << 27),
|
||||
LOG_WEBSOCKET = (1L << 28),
|
||||
LOG_OPAL = (1L << 30),
|
||||
|
||||
/* Classes */
|
||||
LOG_NODES = LOG_NODE | LOG_SOCKET | LOG_FILE | LOG_FPGA | LOG_NGSI | LOG_WEBSOCKET | LOG_OPAL,
|
||||
|
|
Loading…
Add table
Reference in a new issue