71 typedef int(*dav_seek_func)(const void *, long, int); |
71 typedef int(*dav_seek_func)(const void *, long, int); |
72 |
72 |
73 typedef int(*dav_auth_func)(DavSession *, void *); |
73 typedef int(*dav_auth_func)(DavSession *, void *); |
74 typedef void(*dav_progress_func)(DavResource *, int64_t, int64_t, void *); |
74 typedef void(*dav_progress_func)(DavResource *, int64_t, int64_t, void *); |
75 |
75 |
|
76 |
|
77 typedef void(*dav_rqlog_func)( |
|
78 DavSession *sn, |
|
79 const char *method, |
|
80 const char *url, |
|
81 const char *request_body, |
|
82 size_t request_bodylen, |
|
83 int status, |
|
84 const char *response_body, |
|
85 size_t response_bodylen); |
|
86 |
76 enum DavError { |
87 enum DavError { |
77 DAV_OK = 0, |
88 DAV_OK = 0, |
78 DAV_ERROR, |
89 DAV_ERROR, |
79 DAV_NOT_FOUND, |
90 DAV_NOT_FOUND, |
80 DAV_UNAUTHORIZED, |
91 DAV_UNAUTHORIZED, |
158 char *errorstr; |
169 char *errorstr; |
159 |
170 |
160 int(*auth_prompt)(DavSession *sn, void *userdata); |
171 int(*auth_prompt)(DavSession *sn, void *userdata); |
161 void *authprompt_userdata; |
172 void *authprompt_userdata; |
162 |
173 |
|
174 dav_rqlog_func logfunc; |
|
175 |
163 void(*get_progress)(DavResource *res, int64_t total, int64_t now, void *userdata); |
176 void(*get_progress)(DavResource *res, int64_t total, int64_t now, void *userdata); |
164 void(*put_progress)(DavResource *res, int64_t total, int64_t now, void *userdata); |
177 void(*put_progress)(DavResource *res, int64_t total, int64_t now, void *userdata); |
165 void *progress_userdata; |
178 void *progress_userdata; |
166 }; |
179 }; |
167 |
180 |
346 |
359 |
347 DavOutputStream* dav_outputstream_open(DavResource *res); |
360 DavOutputStream* dav_outputstream_open(DavResource *res); |
348 size_t dav_write(const void *buf, size_t size, size_t nitems, DavOutputStream *out); |
361 size_t dav_write(const void *buf, size_t size, size_t nitems, DavOutputStream *out); |
349 int dav_outputstream_close(DavOutputStream *out); |
362 int dav_outputstream_close(DavOutputStream *out); |
350 |
363 |
|
364 void dav_verbose_log( |
|
365 DavSession *sn, |
|
366 const char *method, |
|
367 const char *url, |
|
368 const char *request_body, |
|
369 size_t request_bodylen, |
|
370 int status, |
|
371 const char *response_body, |
|
372 size_t response_bodylen); |
|
373 |
351 // private |
374 // private |
352 int dav_propfind(DavSession *sn, DavResource *root, CxBuffer *rqbuf); |
375 int dav_propfind(DavSession *sn, DavResource *root, CxBuffer *rqbuf); |
353 |
376 |
354 |
377 |
355 /* --------------------------- DeltaV ---------------------------- */ |
378 /* --------------------------- DeltaV ---------------------------- */ |