From a6b698d4ebc93525adc592f85e82fd41d7a2d2d2 Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 13 Apr 2018 07:12:53 +0700 Subject: [PATCH] Move common parts of API. --- CMakeLists.txt | 12 ++++++------ src/App.cpp | 2 +- src/api/Api.cpp | 4 ++-- src/api/ApiRouter.cpp | 4 ++-- src/{ => common}/api/HttpBody.h | 0 src/{ => common}/api/HttpReply.h | 0 src/{ => common}/api/HttpRequest.cpp | 6 +++--- src/{ => common}/api/HttpRequest.h | 0 src/{ => common}/api/Httpd.cpp | 6 +++--- src/{ => common}/api/Httpd.h | 0 10 files changed, 17 insertions(+), 17 deletions(-) rename src/{ => common}/api/HttpBody.h (100%) rename src/{ => common}/api/HttpReply.h (100%) rename src/{ => common}/api/HttpRequest.cpp (97%) rename src/{ => common}/api/HttpRequest.h (100%) rename src/{ => common}/api/Httpd.cpp (97%) rename src/{ => common}/api/Httpd.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97d3e51b9..0da768b2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,14 +214,14 @@ if (WITH_HTTPD) set(HTTPD_SOURCES src/api/Api.h src/api/ApiRouter.h - src/api/HttpBody.h - src/api/Httpd.h - src/api/HttpReply.h - src/api/HttpRequest.h + src/common/api/HttpBody.h + src/common/api/Httpd.h + src/common/api/HttpReply.h + src/common/api/HttpRequest.h src/api/Api.cpp src/api/ApiRouter.cpp - src/api/Httpd.cpp - src/api/HttpRequest.cpp + src/common/api/Httpd.cpp + src/common/api/HttpRequest.cpp ) else() message(FATAL_ERROR "microhttpd NOT found: use `-DWITH_HTTPD=OFF` to build without http deamon support") diff --git a/src/App.cpp b/src/App.cpp index dc22836df..9ac785006 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -45,7 +45,7 @@ #ifndef XMRIG_NO_HTTPD -# include "api/Httpd.h" +# include "common/api/Httpd.h" #endif diff --git a/src/api/Api.cpp b/src/api/Api.cpp index 368591363..6f9991ee1 100644 --- a/src/api/Api.cpp +++ b/src/api/Api.cpp @@ -26,8 +26,8 @@ #include "api/Api.h" #include "api/ApiRouter.h" -#include "api/HttpReply.h" -#include "api/HttpRequest.h" +#include "common/api/HttpReply.h" +#include "common/api/HttpRequest.h" ApiRouter *Api::m_router = nullptr; diff --git a/src/api/ApiRouter.cpp b/src/api/ApiRouter.cpp index 6c4f1f271..81f765c5a 100644 --- a/src/api/ApiRouter.cpp +++ b/src/api/ApiRouter.cpp @@ -33,8 +33,8 @@ #include "api/ApiRouter.h" -#include "api/HttpReply.h" -#include "api/HttpRequest.h" +#include "common/api/HttpReply.h" +#include "common/api/HttpRequest.h" #include "core/Config.h" #include "core/Controller.h" #include "Cpu.h" diff --git a/src/api/HttpBody.h b/src/common/api/HttpBody.h similarity index 100% rename from src/api/HttpBody.h rename to src/common/api/HttpBody.h diff --git a/src/api/HttpReply.h b/src/common/api/HttpReply.h similarity index 100% rename from src/api/HttpReply.h rename to src/common/api/HttpReply.h diff --git a/src/api/HttpRequest.cpp b/src/common/api/HttpRequest.cpp similarity index 97% rename from src/api/HttpRequest.cpp rename to src/common/api/HttpRequest.cpp index ac7210bd4..01245dfc0 100644 --- a/src/api/HttpRequest.cpp +++ b/src/common/api/HttpRequest.cpp @@ -25,9 +25,9 @@ #include #include -#include "api/HttpBody.h" -#include "api/HttpRequest.h" -#include "api/HttpReply.h" +#include "common/api/HttpBody.h" +#include "common/api/HttpRequest.h" +#include "common/api/HttpReply.h" #ifndef MHD_HTTP_PAYLOAD_TOO_LARGE diff --git a/src/api/HttpRequest.h b/src/common/api/HttpRequest.h similarity index 100% rename from src/api/HttpRequest.h rename to src/common/api/HttpRequest.h diff --git a/src/api/Httpd.cpp b/src/common/api/Httpd.cpp similarity index 97% rename from src/api/Httpd.cpp rename to src/common/api/Httpd.cpp index e0901b771..135ac7c9a 100644 --- a/src/api/Httpd.cpp +++ b/src/common/api/Httpd.cpp @@ -27,9 +27,9 @@ #include "api/Api.h" -#include "api/Httpd.h" -#include "api/HttpReply.h" -#include "api/HttpRequest.h" +#include "common/api/Httpd.h" +#include "common/api/HttpReply.h" +#include "common/api/HttpRequest.h" #include "log/Log.h" diff --git a/src/api/Httpd.h b/src/common/api/Httpd.h similarity index 100% rename from src/api/Httpd.h rename to src/common/api/Httpd.h