diff Core/RestApi/RestApiHierarchy.cpp @ 1441:f3672356c121

refactoring: IHttpHandler and HttpToolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Jul 2015 10:38:39 +0200
parents bba8a47922d1
children b2b09a3dbd8e
line wrap: on
line diff
--- a/Core/RestApi/RestApiHierarchy.cpp	Wed Jul 01 10:18:26 2015 +0200
+++ b/Core/RestApi/RestApiHierarchy.cpp	Wed Jul 01 10:38:39 2015 +0200
@@ -199,7 +199,7 @@
   }
 
 
-  bool RestApiHierarchy::LookupResource(HttpHandler::Arguments& components,
+  bool RestApiHierarchy::LookupResource(IHttpHandler::Arguments& components,
                                        const UriComponents& uri,
                                        IVisitor& visitor,
                                        size_t level)
@@ -240,7 +240,7 @@
       for (child = wildcardChildren_.begin();
            child != wildcardChildren_.end(); ++child)
       {
-        HttpHandler::Arguments subComponents = components;
+        IHttpHandler::Arguments subComponents = components;
         subComponents[child->first] = uri[level];
 
         if (child->second->LookupResource(subComponents, uri, visitor, level + 1))
@@ -404,7 +404,7 @@
   bool RestApiHierarchy::LookupResource(const UriComponents& uri,
                                         IVisitor& visitor)
   {
-    HttpHandler::Arguments components;
+    IHttpHandler::Arguments components;
     return LookupResource(components, uri, visitor, 0);
   }    
 
@@ -426,7 +426,7 @@
 
       virtual bool Visit(const RestApiHierarchy::Resource& resource,
                          const UriComponents& uri,
-                         const HttpHandler::Arguments& components,
+                         const IHttpHandler::Arguments& components,
                          const UriComponents& trailing)
       {
         if (trailing.size() == 0)  // Ignore universal handlers
@@ -460,7 +460,7 @@
   void RestApiHierarchy::GetAcceptedMethods(std::set<HttpMethod>& methods,
                                             const UriComponents& uri)
   {
-    HttpHandler::Arguments components;
+    IHttpHandler::Arguments components;
     AcceptedMethodsVisitor visitor(methods);
     LookupResource(components, uri, visitor, 0);