summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2017-04-05 13:04:39 -0700
committerEd Tanous <ed.tanous@intel.com>2017-04-05 13:17:36 -0700
commit7d3dba40b6576ece9850c7156a481436b5f5ef02 (patch)
tree5042fa6df66620b82706f25d3eb19e1a4c14d364 /include
parentb4a7bfad0a3ded7a813bdb44a46383316dc49b24 (diff)
downloadbmcweb-7d3dba40b6576ece9850c7156a481436b5f5ef02.tar.gz
bmcweb-7d3dba40b6576ece9850c7156a481436b5f5ef02.zip
Make app middlewares not require specific instances of app
Diffstat (limited to 'include')
-rw-r--r--include/crow/bmc_app_type.hpp7
-rw-r--r--include/g3log/generated_definitions.hpp13
-rw-r--r--include/web_kvm.hpp6
3 files changed, 16 insertions, 10 deletions
diff --git a/include/crow/bmc_app_type.hpp b/include/crow/bmc_app_type.hpp
deleted file mode 100644
index 061143b..0000000
--- a/include/crow/bmc_app_type.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once
-
-#include <crow/app.h>
-#include <token_authorization_middleware.hpp>
-#include <security_headers_middleware.hpp>
-
-using BmcAppType = crow::App<crow::TokenAuthorizationMiddleware, crow::SecurityHeadersMiddleware>; \ No newline at end of file
diff --git a/include/g3log/generated_definitions.hpp b/include/g3log/generated_definitions.hpp
new file mode 100644
index 0000000..18433bb
--- /dev/null
+++ b/include/g3log/generated_definitions.hpp
@@ -0,0 +1,13 @@
+// AUTO GENERATED MACRO DEFINITIONS FOR G3LOG
+
+/** ==========================================================================
+* 2015 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes
+* with no warranties. This code is yours to share, use and modify with no
+* strings attached and no restrictions or obligations.
+*
+* For more information see g3log/LICENSE or refer refer to http://unlicense.org
+* ============================================================================*/
+#pragma once
+
+// CMake induced definitions below. See g3log/Options.cmake for details.
+
diff --git a/include/web_kvm.hpp b/include/web_kvm.hpp
index 65fe812..40c5128 100644
--- a/include/web_kvm.hpp
+++ b/include/web_kvm.hpp
@@ -1,8 +1,7 @@
+#include <crow/app.h>
#include <boost/endian/arithmetic.hpp>
#include <string>
-#include <crow/bmc_app_type.hpp>
-
#include <video.h>
namespace crow {
@@ -176,7 +175,8 @@ meta_list connection_states(10);
connection_metadata meta;
-void request_routes(BmcAppType& app) {
+template <typename... Middlewares>
+void request_routes(Crow<Middlewares...>& app) {
CROW_ROUTE(app, "/kvmws")
.websocket()
.onopen([&](crow::websocket::connection& conn) {
OpenPOWER on IntegriCloud