660834d453
Conflicts resolved: - config_create signature: added both use_metadata and use_sendfile params - config_send/config_receive: wire protocol includes both use_metadata and use_sendfile - client.c: config_create call updated, arg parsing includes both -M/--preserve and -f/--sendfile - test_config.c: all three config_create calls updated - file_send_sendfile: use file->data->size instead of removed struct stat
31 lines
889 B
C
31 lines
889 B
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef struct Config {
|
|
char *version;
|
|
char *send_directory;
|
|
char *receive_root_directory;
|
|
bool save_to_disk;
|
|
bool use_multithreading;
|
|
bool use_chunk_serialization;
|
|
bool use_compression;
|
|
bool use_sendfile;
|
|
bool use_single_send_per_file;
|
|
bool use_metadata;
|
|
int compression_level;
|
|
int num_connections;
|
|
} Config;
|
|
|
|
Config *config_create(char *version, char *send_directory,
|
|
char *receive_directory, bool save_to_disk,
|
|
bool use_multithreading, bool use_chunk_serialization,
|
|
bool use_compression, bool use_metadata,
|
|
int compression_level, int num_connections, bool use_sendfile);
|
|
void config_delete(Config *config);
|
|
void config_send(int file_descriptor, Config *config);
|
|
Config *config_receive(int file_descriptor);
|
|
|
|
#endif
|