b3f69208ce
- Remove debug printf calls from file.c - Remove dead code: chunk_print, chunk_format, chunk_data_create/delete - Remove unused config.use_single_send_per_file field - Fix server_delete() no-op (double-pointer) - Fix double cast (long)(long) -> ptrdiff_t in chunk.c - Fix thread return value: thrd_error instead of 1 - Remove unused config param from receive_chunk_enqueue() - Make queue_double_capacity() static - Move SSH dest parsing into config.c as config_parse_ssh_dest() - Fix test_config_ssh_dest to test parsing round-trip - Remove chunk_format test (obsolete format) - Replace chunk_data_delete with data_destroy in tests
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef enum {
|
|
TRANSPORT_TCP,
|
|
TRANSPORT_SSH
|
|
} TransportType;
|
|
|
|
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_metadata;
|
|
int compression_level;
|
|
int num_connections;
|
|
TransportType transport;
|
|
char *ssh_destination;
|
|
} 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);
|
|
bool is_remote_dest(const char *s);
|
|
void config_parse_ssh_dest(Config *config);
|
|
|
|
#endif
|