Remove namespace in http layer
Within this namespace, we don't need to call crow, we are already in the
crow namespace.
Tested: Code compiles.
Change-Id: Ida57624ef1157f98f2719b5c3af536aebaca601e
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/http/routing/sserule.hpp b/http/routing/sserule.hpp
index 9fb6ba3..5e9ba5e 100644
--- a/http/routing/sserule.hpp
+++ b/http/routing/sserule.hpp
@@ -54,9 +54,8 @@
}
private:
- std::function<void(crow::sse_socket::Connection&, const crow::Request&)>
- openHandler;
- std::function<void(crow::sse_socket::Connection&)> closeHandler;
+ std::function<void(sse_socket::Connection&, const Request&)> openHandler;
+ std::function<void(sse_socket::Connection&)> closeHandler;
};
} // namespace crow
diff --git a/http/routing/taggedrule.hpp b/http/routing/taggedrule.hpp
index b785d88..7066784 100644
--- a/http/routing/taggedrule.hpp
+++ b/http/routing/taggedrule.hpp
@@ -37,12 +37,12 @@
void operator()(Func&& f)
{
static_assert(
- std::is_invocable_v<Func, crow::Request,
+ std::is_invocable_v<Func, Request,
std::shared_ptr<bmcweb::AsyncResp>&, Args...>,
"Handler type is mismatched with URL parameters");
static_assert(
std::is_same_v<
- void, std::invoke_result_t<Func, crow::Request,
+ void, std::invoke_result_t<Func, Request,
std::shared_ptr<bmcweb::AsyncResp>&,
Args...>>,
"Handler function with response argument should have void return type");
@@ -83,7 +83,7 @@
}
private:
- std::function<void(const crow::Request&,
+ std::function<void(const Request&,
const std::shared_ptr<bmcweb::AsyncResp>&, Args...)>
handler;
};
diff --git a/http/routing/websocketrule.hpp b/http/routing/websocketrule.hpp
index 56bc6ca..b5ca92e 100644
--- a/http/routing/websocketrule.hpp
+++ b/http/routing/websocketrule.hpp
@@ -89,15 +89,15 @@
}
protected:
- std::function<void(crow::websocket::Connection&)> openHandler;
- std::function<void(crow::websocket::Connection&, const std::string&, bool)>
+ std::function<void(websocket::Connection&)> openHandler;
+ std::function<void(websocket::Connection&, const std::string&, bool)>
messageHandler;
- std::function<void(crow::websocket::Connection&, std::string_view,
- crow::websocket::MessageType type,
+ std::function<void(websocket::Connection&, std::string_view,
+ websocket::MessageType type,
std::function<void()>&& whenComplete)>
messageExHandler;
- std::function<void(crow::websocket::Connection&, const std::string&)>
+ std::function<void(websocket::Connection&, const std::string&)>
closeHandler;
- std::function<void(crow::websocket::Connection&)> errorHandler;
+ std::function<void(websocket::Connection&)> errorHandler;
};
} // namespace crow