35 |
35 |
36 #include "sopt.h" |
36 #include "sopt.h" |
37 |
37 |
38 #include "version.h" |
38 #include "version.h" |
39 |
39 |
|
40 #ifdef _WIN32 |
|
41 // TODO: thread includes |
|
42 #else |
|
43 #include <pthread.h> |
|
44 #endif /* _WIN32 */ |
|
45 |
40 #ifdef __cplusplus |
46 #ifdef __cplusplus |
41 extern "C" { |
47 extern "C" { |
42 #endif |
48 #endif |
43 |
49 |
44 #define STDIN_BUF_SIZE 2048 |
50 #define STDIN_BUF_SIZE 2048 |
45 |
51 |
46 void print_usage(char *cmd); |
52 void print_usage(char *cmd); |
|
53 |
|
54 pthread_t start_sighandler(pthread_mutex_t *mutex) ; |
|
55 void stop_sighandler(pthread_mutex_t *mutex, pthread_t tid); |
47 |
56 |
48 int cmd_pull(CmdArgs *args); |
57 int cmd_pull(CmdArgs *args); |
49 int cmd_push(CmdArgs *args, DavBool archive); |
58 int cmd_push(CmdArgs *args, DavBool archive); |
50 |
59 |
51 int sync_get_resource( |
60 int sync_get_resource( |
60 char* create_tmp_download_path(char *path); |
69 char* create_tmp_download_path(char *path); |
61 void move_to_trash(SyncDirectory *dir, char *path); |
70 void move_to_trash(SyncDirectory *dir, char *path); |
62 UcxList* local_scan(SyncDirectory *dir, SyncDatabase *db); |
71 UcxList* local_scan(SyncDirectory *dir, SyncDatabase *db); |
63 UcxList* read_changes(SyncDirectory *dir, SyncDatabase *db); |
72 UcxList* read_changes(SyncDirectory *dir, SyncDatabase *db); |
64 LocalResource* local_resource_new(SyncDirectory *dir, SyncDatabase *db, char *path, int *isdir); |
73 LocalResource* local_resource_new(SyncDirectory *dir, SyncDatabase *db, char *path, int *isdir); |
|
74 LocalResource* local_resource_copy(LocalResource *res); |
65 int local_resource_is_changed(SyncDirectory *dir, SyncDatabase *db, LocalResource *res); |
75 int local_resource_is_changed(SyncDirectory *dir, SyncDatabase *db, LocalResource *res); |
66 int remote_resource_is_changed( |
76 int remote_resource_is_changed( |
67 DavSession *sn, |
77 DavSession *sn, |
68 SyncDirectory *dir, |
78 SyncDirectory *dir, |
69 SyncDatabase *db, |
79 SyncDatabase *db, |