/* * Copyright (C) Starfields */ #include #ifndef NGX_HTTP_DAV_EXT_CONF_H #define NGX_HTTP_DAV_EXT_CONF_H typedef struct { ngx_str_t uri; ngx_str_t name; time_t mtime; off_t size; time_t lock_expire; ngx_str_t lock_root; uint32_t lock_token; unsigned dir : 1; unsigned lock_supported : 1; unsigned lock_infinite : 1; } ngx_http_dav_ext_entry_t; typedef struct { ngx_queue_t queue; } ngx_http_dav_ext_lock_sh_t; typedef struct { time_t timeout; ngx_slab_pool_t *shpool; ngx_http_dav_ext_lock_sh_t *sh; } ngx_http_dav_ext_lock_t; typedef struct { ngx_queue_t queue; uint32_t token; time_t expire; ngx_uint_t infinite; /* unsigned infinite:1; */ size_t len; u_char data[1]; } ngx_http_dav_ext_node_t; ngx_int_t ngx_http_dav_delete_path(ngx_http_request_t *r, ngx_str_t *path, ngx_uint_t dir); ngx_int_t ensure_trailing_slash(ngx_http_request_t *r, ngx_str_t *uri); ngx_int_t ngx_http_dav_depth(ngx_http_request_t *r, ngx_int_t default_depth); ngx_int_t ngx_http_dav_ext_depth(ngx_http_request_t *r, ngx_int_t default_depth); ngx_int_t ngx_http_dav_location(ngx_http_request_t *r); ngx_int_t ngx_http_dav_error(ngx_log_t *log, ngx_err_t err, ngx_int_t not_found, char *failed, u_char *path); uint32_t ngx_http_dav_ext_if(ngx_http_request_t *r, ngx_str_t *uri); ngx_http_dav_ext_node_t * ngx_http_dav_ext_lock_lookup(ngx_http_request_t *r, ngx_http_dav_ext_lock_t *lock, ngx_str_t *uri, ngx_int_t depth); ngx_int_t ngx_http_dav_ext_set_locks(ngx_http_request_t *r, ngx_http_dav_ext_entry_t *entry); uintptr_t ngx_http_dav_ext_format_lockdiscovery(ngx_http_request_t *r, u_char *dst, ngx_http_dav_ext_entry_t *entry); uintptr_t ngx_http_dav_ext_format_token(u_char *dst, uint32_t token, ngx_uint_t brackets); ngx_int_t ngx_http_dav_ext_strip_uri(ngx_http_request_t *r, ngx_str_t *uri); ngx_int_t ngx_http_dav_noop(ngx_tree_ctx_t *ctx, ngx_str_t *path); #endif