Qore WebDavHandler Module Reference 1.0
Loading...
Searching...
No Matches
InMemoryWebDavPropertyHandler.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
2
3/* WebDavHandler module Copyright 2019 - 2022 Qore Technologies, s.r.o.
4
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 DEALINGS IN THE SOFTWARE.
22*/
23
25namespace WebDavHandler {
28
29public:
30protected:
32 RWLock m_lock();
33
35 hash<string, hash<string, hash<auto>>> m_cache = {};
36
38 bool debug;
39
40public:
41
42 constructor();
43
44
46 *hash<auto> get(string resource, string ns = DavNs, list<string> prop_names);
47
48
50 auto get(string resource, string ns = DavNs, string prop_name);
51
52
54
56 *hash<string, hash<auto>> getAll(string resource);
57
58
60
62 *hash<auto> getAllInNamespace(string resource, string ns);
63
64
66 set(string resource, string ns = DavNs, string prop_name, auto value);
67
68
70 del(string resource, string ns = DavNs, list<string> prop_names);
71
72
74 del(string resource, string ns = DavNs, string prop_name);
75
76
78 delAll(string resource);
79
80
82 cp(string src_url, string target_url);
83
84
86 move(string src_url, string target_url);
87
88}; // class InMemoryWebDavPropertyHandler
89}; // namespace WebDavHandler
90
The abstract WebDavHandler property handler class interface.
Definition AbstractWebDavPropertyHandler.qc.dox.h:27
An in-memory property handler that stores and retrieves all properties in memory.
Definition InMemoryWebDavPropertyHandler.qc.dox.h:27
*hash< auto > get(string resource, string ns=DavNs, list< string > prop_names)
Retrieves the value(s) of the given properties in the given namespace.
del(string resource, string ns=DavNs, list< string > prop_names)
Deletes one or more properties.
hash< string, hash< string, hash< auto > > > m_cache
Property cache; URL -> namespace -> property -> value.
Definition InMemoryWebDavPropertyHandler.qc.dox.h:35
*hash< string, hash< auto > > getAll(string resource)
Returns all properties in all namespaces.
auto get(string resource, string ns=DavNs, string prop_name)
Retrieves the value(s) of the given properties in the given namespace.
RWLock m_lock()
Read-write lock for atomicity.
*hash< auto > getAllInNamespace(string resource, string ns)
Returns all properties in the given namespaces.
delAll(string resource)
Deletes all properties for the given resource.
set(string resource, string ns=DavNs, string prop_name, auto value)
Sets a property value.
cp(string src_url, string target_url)
Copies all properties to another target URL.
del(string resource, string ns=DavNs, string prop_name)
Deletes a property.
move(string src_url, string target_url)
Moves properties from one target URL to another.
bool debug
Debug flag.
Definition InMemoryWebDavPropertyHandler.qc.dox.h:38
Main public WebDavHandler namespace.
Definition AbstractWebDavHandler.qc.dox.h:26
const DavNs
WebDavHandler namespace value.
Definition WebDavHandler.qm.dox.h:116
string ns
Namespace.
Definition AbstractWebDavHandler.qc.dox.h:32