src/server/webdav/webdav.h

branch
webdav
changeset 211
2160585200ac
parent 107
7e81699d1f77
child 212
d7e7ea9c6bc6
equal deleted inserted replaced
210:21274e5950af 211:2160585200ac
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2013 Olaf Wintermann. All rights reserved. 4 * Copyright 2019 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
28 28
29 #ifndef WEBDAV_H 29 #ifndef WEBDAV_H
30 #define WEBDAV_H 30 #define WEBDAV_H
31 31
32 #include "../public/webdav.h" 32 #include "../public/webdav.h"
33 #include "../util/strbuf.h"
34 33
35 #include <ucx/map.h> 34 #include <ucx/map.h>
36 #include <ucx/list.h> 35 #include <ucx/list.h>
37 36
38 #ifdef __cplusplus 37 #ifdef __cplusplus
39 extern "C" { 38 extern "C" {
40 #endif 39 #endif
41 40
41 #define WEBDAV_PATH_MAX 8192
42
43 typedef struct DefaultWebdavData {
44 WebdavVFSProperties vfsproperties;
45 } DefaultWebdavData;
46
47
48 int webdav_init(pblock *pb, Session *sn, Request *rq);
49
50 int webdav_service(pblock *pb, Session *sn, Request *rq);
42 51
52 UcxBuffer* rqbody2buffer(Session *sn, Request *rq);
53
54 int webdav_getdepth(Request *rq);
55
56 int webdav_options(pblock *pb, Session *sn, Request *rq);
57
58 int webdav_propfind(pblock *pb, Session *sn, Request *rq);
59 int propfind_children(
60 WebdavBackend *webdav,
61 WebdavPropfindRequest *request,
62 WebdavResponse *response,
63 VFSContext *vfs,
64 char *path);
65
66 int webdav_proppatch(pblock *pb, Session *sn, Request *rq);
67 int webdav_mkcol(pblock *pb, Session *sn, Request *rq);
68 int webdav_post(pblock *pb, Session *sn, Request *rq);
69 int webdav_delete(pblock *pb, Session *sn, Request *rq);
70 int webdav_put(pblock *pb, Session *sn, Request *rq);
71 int webdav_copy(pblock *pb, Session *sn, Request *rq);
72 int webdav_move(pblock *pb, Session *sn, Request *rq);
73 int webdav_lock(pblock *pb, Session *sn, Request *rq);
74 int webdav_unlock(pblock *pb, Session *sn, Request *rq);
75 int webdav_report(pblock *pb, Session *sn, Request *rq);
76 int webdav_acl(pblock *pb, Session *sn, Request *rq);
77 int webdav_search (pblock *pb, Session *sn, Request *rq);
78
79 int default_propfind_init(
80 WebdavPropfindRequest *rq,
81 const char* path);
82 int default_propfind_do(
83 WebdavPropfindRequest *request,
84 WebdavResponse *response,
85 VFS_DIR parent,
86 const char *path,
87 struct stat *s);
88 int default_propfind_finish(WebdavPropfindRequest *rq);
43 89
44 #ifdef __cplusplus 90 #ifdef __cplusplus
45 } 91 }
46 #endif 92 #endif
47 93

mercurial