forked from UtrechtUniversity/davrods
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrepo.h
88 lines (67 loc) · 2.2 KB
/
repo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* \file
* \brief Davrods DAV repository.
* \author Chris Smeele
* \copyright Copyright (c) 2016, Utrecht University
*
* This file is part of Davrods.
*
* Davrods is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Davrods is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Davrods. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DAVRODS_REPO_H
#define _DAVRODS_REPO_H
#include "common.h"
#include "config.h"
#include <irods/rodsClient.h>
//#include <irods/rods.h>
/**
* \brief Private implementation-specific resource information.
*
* This is property `info` of the dav_resource struct.
*
* We mostly use it to access iRODS connection state and iRODS specific (dav)
* resource information.
*/
struct dav_resource_private {
// Information specific to the HTTP request {{{
request_rec *r;
apr_pool_t *davrods_pool;
davrods_dir_conf_t *conf;
rcComm_t *rods_conn;
rodsEnv *rods_env;
const char *rods_root;
// }}}
// Information specific to the DAV resource {{{
// This is `MAX_NAME_LEN` as specified by iRODS.
char rods_path[MAX_NAME_LEN]; // Currently 1024 + 64.
// relative_uri is resource->uri with the root_dir chopped off.
// i.e. with a Davrods in <Location /abc/def/>,
// resource->uri may be /abc/def/some_file.txt,
// while relative_uri will be just /some_file.txt.
const char *relative_uri;
rodsObjStat_t *stat;
const char *root_dir;
// }}}
};
extern const dav_hooks_repository davrods_hooks_repository;
#ifdef __cplusplus
extern "C"
{
#endif
const char *get_basename(const char *path);
const char *GetRodsExposedPath (request_rec *req_p);
#ifdef __cplusplus
}
#endif
#endif /* _DAVRODS_REPO_H */