comparison OrthancServer/main.cpp @ 473:c9a5d72f8481

changing the namespace of HTTP enumerations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Jul 2013 17:22:13 +0200
parents 53d79c963e4a
children e318e9d49815 e0cfb413c86b 489f6a375277
comparison
equal deleted inserted replaced
472:722b56b99093 473:c9a5d72f8481
156 public: 156 public:
157 MyIncomingHttpRequestFilter(ServerContext& context) : context_(context) 157 MyIncomingHttpRequestFilter(ServerContext& context) : context_(context)
158 { 158 {
159 } 159 }
160 160
161 virtual bool IsAllowed(Orthanc_HttpMethod method, 161 virtual bool IsAllowed(HttpMethod method,
162 const char* uri, 162 const char* uri,
163 const char* ip, 163 const char* ip,
164 const char* username) const 164 const char* username) const
165 { 165 {
166 static const char* HTTP_FILTER = "IncomingHttpRequestFilter"; 166 static const char* HTTP_FILTER = "IncomingHttpRequestFilter";
170 { 170 {
171 LuaFunctionCall call(context_.GetLuaContext(), HTTP_FILTER); 171 LuaFunctionCall call(context_.GetLuaContext(), HTTP_FILTER);
172 172
173 switch (method) 173 switch (method)
174 { 174 {
175 case Orthanc_HttpMethod_Get: 175 case HttpMethod_Get:
176 call.PushString("GET"); 176 call.PushString("GET");
177 break; 177 break;
178 178
179 case Orthanc_HttpMethod_Put: 179 case HttpMethod_Put:
180 call.PushString("PUT"); 180 call.PushString("PUT");
181 break; 181 break;
182 182
183 case Orthanc_HttpMethod_Post: 183 case HttpMethod_Post:
184 call.PushString("POST"); 184 call.PushString("POST");
185 break; 185 break;
186 186
187 case Orthanc_HttpMethod_Delete: 187 case HttpMethod_Delete:
188 call.PushString("DELETE"); 188 call.PushString("DELETE");
189 break; 189 break;
190 190
191 default: 191 default:
192 return true; 192 return true;