annotate Core/RestApi/RestApiHierarchy.h @ 2270:512e69a0c761 Barnerd/fix-build-with-libressl-libressl-comp-1488028354841

Fix build with LibreSSL - LibreSSL completely removed FIPS Remove spurious space
author Bernard Spil <bitbucket@brnrd.eu>
date Sat, 25 Feb 2017 13:12:46 +0000
parents a3a65de1840f
children 878b59270859
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1441
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1288
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 978
diff changeset
4 * Department, University Hospital of Liege, Belgium
2244
a3a65de1840f shared copyright with osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
5 * Copyright (C) 2017 Osimis, Belgium
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * In addition, as a special exception, the copyright holders of this
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * you do not wish to do so, delete this exception statement from your
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #pragma once
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
975
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
36 #include "RestApiGetCall.h"
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
37 #include "RestApiPostCall.h"
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
38 #include "RestApiPutCall.h"
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
39 #include "RestApiDeleteCall.h"
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
41 #include <set>
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
42
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 namespace Orthanc
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
45 class RestApiHierarchy : public boost::noncopyable
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
47 public:
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
48 class Resource : public boost::noncopyable
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 {
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
50 private:
975
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
51 RestApiGetCall::Handler getHandler_;
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
52 RestApiPostCall::Handler postHandler_;
c550e99c452b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 974
diff changeset
53 RestApiPutCall::Handler putHandler_;
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
54 RestApiDeleteCall::Handler deleteHandler_;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
56 public:
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
57 Resource();
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
58
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
59 bool HasHandler(HttpMethod method) const;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
61 void Register(RestApiGetCall::Handler handler)
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 {
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
63 getHandler_ = handler;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 }
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
66 void Register(RestApiPutCall::Handler handler)
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 {
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
68 putHandler_ = handler;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 }
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
71 void Register(RestApiPostCall::Handler handler)
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 {
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
73 postHandler_ = handler;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
76 void Register(RestApiDeleteCall::Handler handler)
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 {
972
2047e6f033bd refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 970
diff changeset
78 deleteHandler_ = handler;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 }
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 bool IsEmpty() const;
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
82
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
83 bool Handle(RestApiGetCall& call) const;
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
84
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
85 bool Handle(RestApiPutCall& call) const;
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
86
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
87 bool Handle(RestApiPostCall& call) const;
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
88
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
89 bool Handle(RestApiDeleteCall& call) const;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 };
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
93 class IVisitor : public boost::noncopyable
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
94 {
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
95 public:
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
96 virtual ~IVisitor()
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
97 {
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
98 }
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
99
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
100 virtual bool Visit(const Resource& resource,
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
101 const UriComponents& uri,
1441
f3672356c121 refactoring: IHttpHandler and HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
102 const IHttpHandler::Arguments& components,
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
103 const UriComponents& trailing) = 0;
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
104 };
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
105
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
106
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
107 private:
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 typedef std::map<std::string, RestApiHierarchy*> Children;
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
110 Resource handlers_;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 Children children_;
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 Children wildcardChildren_;
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
113 Resource universalHandlers_;
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 static RestApiHierarchy& AddChild(Children& children,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 const std::string& name);
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 static void DeleteChildren(Children& children);
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 template <typename Handler>
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 void RegisterInternal(const RestApiPath& path,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 Handler handler,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 size_t level);
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
125 bool CanGenerateDirectory() const;
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
126
1441
f3672356c121 refactoring: IHttpHandler and HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
127 bool LookupResource(IHttpHandler::Arguments& components,
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
128 const UriComponents& uri,
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
129 IVisitor& visitor,
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
130 size_t level);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 bool GetDirectory(Json::Value& result,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 const UriComponents& uri,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 size_t level);
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 public:
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ~RestApiHierarchy();
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138
970
1a3817d84f39 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 969
diff changeset
139 void Register(const std::string& uri,
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
140 RestApiGetCall::Handler handler);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
970
1a3817d84f39 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 969
diff changeset
142 void Register(const std::string& uri,
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
143 RestApiPutCall::Handler handler);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
970
1a3817d84f39 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 969
diff changeset
145 void Register(const std::string& uri,
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
146 RestApiPostCall::Handler handler);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147
970
1a3817d84f39 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 969
diff changeset
148 void Register(const std::string& uri,
974
83622b0f544c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 972
diff changeset
149 RestApiDeleteCall::Handler handler);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 void CreateSiteMap(Json::Value& target) const;
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 bool GetDirectory(Json::Value& result,
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 const UriComponents& uri)
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 {
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 return GetDirectory(result, uri, 0);
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 }
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
159 bool LookupResource(const UriComponents& uri,
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
160 IVisitor& visitor);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
978
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
162 void GetAcceptedMethods(std::set<HttpMethod>& methods,
ce3106e5843f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 975
diff changeset
163 const UriComponents& uri);
969
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 };
3dce528b0cc2 RestApiHierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 }