72 char *encrypted_name; |
72 char *encrypted_name; |
73 int exists; |
73 int exists; |
74 } DavPathCacheElement; |
74 } DavPathCacheElement; |
75 */ |
75 */ |
76 |
76 |
77 typedef struct DavLock { |
77 typedef struct DavLock DavLock; |
|
78 struct DavLock { |
78 char *path; |
79 char *path; |
79 char *token; |
80 char *token; |
80 |
81 }; |
81 } DavLock; |
|
82 |
82 |
83 typedef struct DavLockManager { |
83 typedef struct DavLockManager { |
84 UcxMap *resource_locks; |
84 CxMap *resource_locks; |
85 UcxList *collection_locks; |
85 CxList *collection_locks; |
86 } DavLockManager; |
86 } DavLockManager; |
87 |
87 |
88 CURLcode dav_session_curl_perform(DavSession *sn, long *status); |
88 CURLcode dav_session_curl_perform(DavSession *sn, long *status); |
89 CURLcode dav_session_curl_perform_buf(DavSession *sn, UcxBuffer *request, UcxBuffer *response, long *status); |
89 CURLcode dav_session_curl_perform_buf(DavSession *sn, CxBuffer *request, CxBuffer *response, long *status); |
90 |
90 |
91 int dav_session_get_progress(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); |
91 int dav_session_get_progress(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); |
92 int dav_session_put_progress(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); |
92 int dav_session_put_progress(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); |
93 |
93 |
94 void dav_session_set_error(DavSession *sn, CURLcode c, int status); |
94 void dav_session_set_error(DavSession *sn, CURLcode c, int status); |
95 void dav_session_set_errstr(DavSession *sn, const char *str); |
95 void dav_session_set_errstr(DavSession *sn, const char *str); |
96 |
96 |
97 char* dav_session_create_plain_href(DavSession *sn, char *path); |
97 char* dav_session_create_plain_href(DavSession *sn, const char *path); |
98 |
98 |
99 char* dav_session_get_href(DavSession *sn, char *path); |
99 char* dav_session_get_href(DavSession *sn, const char *path); |
100 |
100 |
101 DavResource* dav_find_child(DavSession *sn, DavResource *res, UcxBuffer *rqbuf, char *name); |
101 DavResource* dav_find_child(DavSession *sn, DavResource *res, CxBuffer *rqbuf, const char *name); |
102 |
102 |
103 void dav_session_cache_path(DavSession *sn, sstr_t path, sstr_t href); |
103 void dav_session_cache_path(DavSession *sn, cxstring path, cxstring href); |
104 |
104 |
105 |
105 |
106 DavLock* dav_create_lock(DavSession *sn, char *token, char *timeout); |
106 DavLock* dav_create_lock(DavSession *sn, const char *token, char *timeout); |
107 void dav_destroy_lock(DavSession *sn, DavLock *lock); |
107 void dav_destroy_lock(DavSession *sn, DavLock *lock); |
108 |
108 |
109 int dav_add_resource_lock(DavSession *sn, char *path, DavLock *lock); |
109 int dav_add_resource_lock(DavSession *sn, const char *path, DavLock *lock); |
110 int dav_add_collection_lock(DavSession *sn, char *path, DavLock *lock); |
110 int dav_add_collection_lock(DavSession *sn, const char *path, DavLock *lock); |
111 |
111 |
112 DavLock* dav_get_lock(DavSession *sn, char *path); |
112 DavLock* dav_get_lock(DavSession *sn, const char *path); |
113 void dav_remove_lock(DavSession *sn, char *path, DavLock *lock); |
113 void dav_remove_lock(DavSession *sn, const char *path, DavLock *lock); |
114 |
114 |
115 #ifdef __cplusplus |
115 #ifdef __cplusplus |
116 } |
116 } |
117 #endif |
117 #endif |
118 |
118 |