dav/db.h

changeset 747
efbd59642577
parent 692
56b66fe2b4f5
equal deleted inserted replaced
746:a569148841ff 747:efbd59642577
29 #ifndef DB_H 29 #ifndef DB_H
30 #define DB_H 30 #define DB_H
31 31
32 #include <inttypes.h> 32 #include <inttypes.h>
33 #include <libidav/webdav.h> 33 #include <libidav/webdav.h>
34 #include <ucx/map.h> 34 #include <cx/hash_map.h>
35 #include <ucx/buffer.h> 35 #include <cx/linked_list.h>
36 #include <cx/buffer.h>
36 #include <time.h> 37 #include <time.h>
37 38
38 #include <libxml/xmlreader.h> 39 #include <libxml/xmlreader.h>
39 40
40 #include "finfo.h" 41 #include "finfo.h"
60 uid_t uid; 61 uid_t uid;
61 gid_t gid; 62 gid_t gid;
62 off_t size; 63 off_t size;
63 DavBool isdirectory; 64 DavBool isdirectory;
64 DavBool skipped; 65 DavBool skipped;
65 UcxBuffer *cached_tags; 66 CxBuffer *cached_tags;
66 XAttributes *xattr; 67 XAttributes *xattr;
67 char *tags_hash; 68 char *tags_hash;
68 char *xattr_hash; 69 char *xattr_hash;
69 char *remote_tags_hash; 70 char *remote_tags_hash;
70 71
101 char *hash; 102 char *hash;
102 char *etag; 103 char *etag;
103 }; 104 };
104 105
105 struct SyncDatabase { 106 struct SyncDatabase {
106 UcxMap *resources; 107 CxMap *resources;
107 UcxMap *conflict; 108 CxMap *conflict;
108 }; 109 };
109 110
110 SyncDatabase* load_db(char *name); 111 SyncDatabase* load_db(char *name);
111 int store_db(SyncDatabase *db, char *name, uint32_t settings); 112 int store_db(SyncDatabase *db, char *name, uint32_t settings);
112 void destroy_db(SyncDatabase *db); 113 void destroy_db(SyncDatabase *db);
117 118
118 LocalResource* local_resource_copy(LocalResource *src, const char *new_path); 119 LocalResource* local_resource_copy(LocalResource *src, const char *new_path);
119 120
120 void filepart_free(FilePart *part); 121 void filepart_free(FilePart *part);
121 122
122 UcxMap* create_hash_index(SyncDatabase *db); 123 CxMap* create_hash_index(SyncDatabase *db);
123 124
124 LocalResource* process_resource(xmlTextReaderPtr reader); 125 LocalResource* process_resource(xmlTextReaderPtr reader);
125 LocalResource* process_conflict(xmlTextReaderPtr reader); 126 LocalResource* process_conflict(xmlTextReaderPtr reader);
126 127
127 128

mercurial