src/server/public/webdav.h

branch
webdav
changeset 241
4adad7faf452
parent 240
cd74667f6c85
child 244
e59abb210584
equal deleted inserted replaced
240:cd74667f6c85 241:4adad7faf452
189 WebdavPList *set; 189 WebdavPList *set;
190 size_t setcount; 190 size_t setcount;
191 191
192 WebdavPList *remove; 192 WebdavPList *remove;
193 size_t removecount; 193 size_t removecount;
194
195 /*
196 * custom userdata for the backend
197 */
198 void *userdata;
194 }; 199 };
195 200
196 struct WebdavLockRequest { 201 struct WebdavLockRequest {
197 Session *sn; 202 Session *sn;
198 Request *rq; 203 Request *rq;
222 struct WebdavResource { 227 struct WebdavResource {
223 char *href; 228 char *href;
224 229
225 WSBool isclosed; 230 WSBool isclosed;
226 231
232 int err;
233
227 /* 234 /*
228 * int addprop(WebdavResource *res, WebdavProperty *property, int status); 235 * int addprop(WebdavResource *res, WebdavProperty *property, int status);
229 * 236 *
230 * Adds a property to the resource 237 * Adds a property to the resource
231 */ 238 */
279 int (*propfind_finish)(WebdavPropfindRequest *); 286 int (*propfind_finish)(WebdavPropfindRequest *);
280 287
281 /* 288 /*
282 * int proppatch_do( 289 * int proppatch_do(
283 * WebdavProppatchRequest *request, 290 * WebdavProppatchRequest *request,
284 * WebdavResponse *response, 291 * WebdavResource *response,
285 * VFSFile *file); 292 * VFSFile *file,
286 * 293 * WebdavPList **out_set,
287 * Modifies properties of the requsted resource: 294 * WebdavPList **out_remove);
288 */ 295 *
289 int (*proppatch_do)(WebdavProppatchRequest *, WebdavResponse *, VFSFile *); 296 * Modifies properties of the requsted resource.
297 */
298 int (*proppatch_do)(
299 WebdavProppatchRequest *,
300 WebdavResource *,
301 VFSFile *,
302 WebdavPList **,
303 WebdavPList **);
290 304
291 /* 305 /*
292 * int proppatch_finish( 306 * int proppatch_finish(
293 * WebdavProppatchRequest *request, 307 * WebdavProppatchRequest *request,
308 * WebdavResource *response,
309 * VFSFile *file,
294 * WSBool commit); 310 * WSBool commit);
295 * 311 *
296 * Called after all proppatch_do functions of all backends are executed 312 * Called after all proppatch_do functions of all backends are executed
297 * and should either permanently store the properties (commit == true) or 313 * and should either permanently store the properties (commit == true) or
298 * revert all changed (commit == false). 314 * revert all changed (commit == false).
299 */ 315 */
300 int (*proppatch_finish)(WebdavProppatchRequest *, WSBool); 316 int (*proppatch_finish)(
301 317 WebdavProppatchRequest *,
302 /* 318 WebdavResource *,
303 * See the WS_PROPFIND_ macros for informations about the settings 319 VFSFile *,
320 WSBool);
321
322 /*
323 * See the WS_WEBDAV_* macros for informations about the settings
304 */ 324 */
305 uint32_t settings; 325 uint32_t settings;
306 326
307 327
308 /* 328 /*
324 WebdavPList **begin, 344 WebdavPList **begin,
325 WebdavPList **end, 345 WebdavPList **end,
326 WebdavProperty *prop); 346 WebdavProperty *prop);
327 347
328 WebdavPList* webdav_plist_clone(pool_handle_t *pool, WebdavPList *list); 348 WebdavPList* webdav_plist_clone(pool_handle_t *pool, WebdavPList *list);
349 WebdavPList* webdav_plist_clone_s(
350 pool_handle_t *pool,
351 WebdavPList *list,
352 size_t *newlen);
329 353
330 size_t webdav_plist_size(WebdavPList *list); 354 size_t webdav_plist_size(WebdavPList *list);
331 355
332 int webdav_nslist_add( 356 int webdav_nslist_add(
333 pool_handle_t *pool, 357 pool_handle_t *pool,

mercurial