Fix includes
Lots of bad includes got put in recently, including big things, like
boost/http and beast/core. These are lots of code to parse, and leads
to files including things they didn't mean to.
Tested:
Code compiles
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I38de889fdfd9b23f66a2259bb30bf6584345e77f
diff --git a/http/http_client.hpp b/http/http_client.hpp
index f4c3346..93c2a60 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -14,9 +14,10 @@
// limitations under the License.
*/
#pragma once
-#include <boost/asio/strand.hpp>
-#include <boost/beast/core.hpp>
-#include <boost/beast/http.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <boost/beast/core/flat_buffer.hpp>
+#include <boost/beast/core/tcp_stream.hpp>
+#include <boost/beast/http/message.hpp>
#include <boost/beast/version.hpp>
#include <cstdlib>
diff --git a/http/http_connection.h b/http/http_connection.h
index 689b60a..ddedaea 100644
--- a/http/http_connection.h
+++ b/http/http_connection.h
@@ -13,9 +13,8 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
-#include <boost/asio/ssl.hpp>
+#include <boost/asio/ssl/stream.hpp>
#include <boost/beast/core/flat_static_buffer.hpp>
-#include <boost/beast/http.hpp>
#include <boost/beast/ssl/ssl_stream.hpp>
#include <boost/beast/websocket.hpp>
#include <json_html_serializer.hpp>
diff --git a/http/http_request.h b/http/http_request.h
index 367f733..c160368 100644
--- a/http/http_request.h
+++ b/http/http_request.h
@@ -5,8 +5,8 @@
#include "sessions.hpp"
#include <boost/asio/io_context.hpp>
-#include <boost/beast/http.hpp>
-#include <boost/beast/ssl/ssl_stream.hpp>
+#include <boost/beast/http/message.hpp>
+#include <boost/beast/http/string_body.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/url/url_view.hpp>
diff --git a/http/http_response.h b/http/http_response.h
index 68e3f2d..c8f05ab 100644
--- a/http/http_response.h
+++ b/http/http_response.h
@@ -4,7 +4,7 @@
#include "nlohmann/json.hpp"
-#include <boost/beast/http.hpp>
+#include <boost/beast/http/message.hpp>
#include <string>
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index a7f8c6d..e2ebba1 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -17,7 +17,9 @@
#include <app.h>
#include <websocket.h>
-#include <boost/asio.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/local/stream_protocol.hpp>
+#include <boost/asio/write.hpp>
#include <boost/beast/core/buffers_to_string.hpp>
#include <boost/beast/core/multi_buffer.hpp>
#include <boost/container/flat_map.hpp>
diff --git a/include/sessions.hpp b/include/sessions.hpp
index cd549dc..23de570 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -168,11 +168,8 @@
}
};
-class Middleware;
-
struct OpenSSLGenerator
{
-
uint8_t operator()(void)
{
uint8_t index = 0;
diff --git a/redfish-core/include/server_sent_events.hpp b/redfish-core/include/server_sent_events.hpp
index 26fc675..9689001 100644
--- a/redfish-core/include/server_sent_events.hpp
+++ b/redfish-core/include/server_sent_events.hpp
@@ -18,8 +18,9 @@
#include "node.hpp"
#include <boost/asio/strand.hpp>
-#include <boost/beast/core.hpp>
-#include <boost/beast/http.hpp>
+#include <boost/beast/core/span.hpp>
+#include <boost/beast/http/buffer_body.hpp>
+#include <boost/beast/http/message.hpp>
#include <boost/beast/version.hpp>
#include <cstdlib>
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index e18168b..8083566 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -17,7 +17,8 @@
#include "node.hpp"
-#include <boost/asio.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <boost/container/flat_map.hpp>
#include <task_messages.hpp>