71 REMOTE_CHANGE_MODIFIED, |
71 REMOTE_CHANGE_MODIFIED, |
72 REMOTE_CHANGE_NEW, |
72 REMOTE_CHANGE_NEW, |
73 REMOTE_CHANGE_DELETED, |
73 REMOTE_CHANGE_DELETED, |
74 REMOTE_CHANGE_CONFLICT_LOCAL_MODIFIED, |
74 REMOTE_CHANGE_CONFLICT_LOCAL_MODIFIED, |
75 REMOTE_CHANGE_METADATA, |
75 REMOTE_CHANGE_METADATA, |
76 REMOTE_CHANGE_MKDIR |
76 REMOTE_CHANGE_MKDIR, |
77 }; |
77 }; |
78 typedef enum RemoteChangeType RemoteChangeType; |
78 typedef enum RemoteChangeType RemoteChangeType; |
79 |
79 |
80 typedef struct RemoteChange { |
80 typedef struct RemoteChange { |
81 DavResource *resource; |
81 DavResource *resource; |
82 RemoteChangeType type; |
82 RemoteChangeType type; |
83 } RemoteChange; |
83 } RemoteChange; |
84 |
84 |
85 void print_usage(char *cmd); |
85 void print_usage(char *cmd); |
86 |
86 |
87 pthread_t start_sighandler(pthread_mutex_t *mutex) ; |
87 pthread_t start_sighandler(pthread_mutex_t *mutex) ; |
88 void stop_sighandler(pthread_mutex_t *mutex, pthread_t tid); |
88 void stop_sighandler(pthread_mutex_t *mutex, pthread_t tid); |
89 |
89 |
107 DavResource *res, |
107 DavResource *res, |
108 SyncDatabase *db, |
108 SyncDatabase *db, |
109 int *counter); |
109 int *counter); |
110 int sync_remove_local_resource(SyncDirectory *dir, LocalResource *res); |
110 int sync_remove_local_resource(SyncDirectory *dir, LocalResource *res); |
111 int sync_remove_local_directory(SyncDirectory *dir, LocalResource *res); |
111 int sync_remove_local_directory(SyncDirectory *dir, LocalResource *res); |
112 void rename_conflict_file(SyncDirectory *dir, SyncDatabase *db, char *path); |
112 void rename_conflict_file(SyncDirectory *dir, SyncDatabase *db, char *path, DavBool copy); |
113 char* create_tmp_download_path(char *path); |
113 char* create_tmp_download_path(char *path); |
114 void move_to_trash(SyncDirectory *dir, char *path); |
114 void move_to_trash(SyncDirectory *dir, char *path); |
115 |
115 |
116 UcxList* local_scan(SyncDirectory *dir, SyncDatabase *db); |
116 UcxList* local_scan(SyncDirectory *dir, SyncDatabase *db); |
117 UcxList* read_changes(SyncDirectory *dir, SyncDatabase *db); |
117 UcxList* read_changes(SyncDirectory *dir, SyncDatabase *db); |
163 SyncDirectory *dir, |
163 SyncDirectory *dir, |
164 DavSession *sn, |
164 DavSession *sn, |
165 DavResource *res, |
165 DavResource *res, |
166 LocalResource *local); |
166 LocalResource *local); |
167 |
167 |
|
168 void update_parts(LocalResource *local, UcxList *updates, uint64_t numparts); |
|
169 |
168 void remove_deleted_conflicts(SyncDirectory *dir, SyncDatabase *db); |
170 void remove_deleted_conflicts(SyncDirectory *dir, SyncDatabase *db); |
169 |
171 |
170 int cmd_resolve_conflicts(CmdArgs *args); |
172 int cmd_resolve_conflicts(CmdArgs *args); |
171 int cmd_delete_conflicts(CmdArgs *args); |
173 int cmd_delete_conflicts(CmdArgs *args); |
172 |
174 |