From 0f26f359ddb68fae0439e7c0d3c784b2d286c2cd Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Tue, 19 Oct 2021 20:17:40 -0700 Subject: [PATCH] Refactoring project layout --- build | 2 +- src/framework/ALBHealthCheckServer.h | 2 +- src/framework/AuthClient.cpp | 4 ++-- src/framework/AuthClient.h | 4 ++-- src/framework/KafkaManager.cpp | 2 +- src/framework/KafkaManager.h | 2 +- src/framework/Kafka_topics.h | 7 +++++-- src/framework/MicroService.cpp | 4 ++-- src/framework/OpenAPIRequest.cpp | 2 +- src/framework/RESTAPI_GenericServer.h | 2 +- src/framework/RESTAPI_errors.h | 2 ++ src/framework/RESTAPI_handler.cpp | 6 +++--- src/framework/RESTAPI_handler.h | 2 +- src/framework/RESTAPI_system_command.cpp | 6 +++--- src/framework/RESTAPI_system_command.h | 2 +- src/framework/RESTAPI_utils.h | 4 ++-- src/framework/SubSystemServer.cpp | 4 ++-- src/framework/Utils.cpp | 2 +- src/framework/storage_setup.cpp | 4 ++-- 19 files changed, 34 insertions(+), 29 deletions(-) diff --git a/build b/build index fc9afb4..2b82dfe 100644 --- a/build +++ b/build @@ -1 +1 @@ -59 \ No newline at end of file +60 \ No newline at end of file diff --git a/src/framework/ALBHealthCheckServer.h b/src/framework/ALBHealthCheckServer.h index 9b8ef25..af06941 100644 --- a/src/framework/ALBHealthCheckServer.h +++ b/src/framework/ALBHealthCheckServer.h @@ -21,7 +21,7 @@ #include "Poco/Net/HTTPRequestHandler.h" #include "Poco/Logger.h" -#include "../Daemon.h" +#include "Daemon.h" #include "SubSystemServer.h" namespace OpenWifi { diff --git a/src/framework/AuthClient.cpp b/src/framework/AuthClient.cpp index b2cdb60..3deb744 100644 --- a/src/framework/AuthClient.cpp +++ b/src/framework/AuthClient.cpp @@ -9,8 +9,8 @@ #include #include "AuthClient.h" -#include "../RESTAPI/RESTAPI_SecurityObjects.h" -#include "../Daemon.h" +#include "RESTAPI/RESTAPI_SecurityObjects.h" +#include "Daemon.h" #include "OpenAPIRequest.h" namespace OpenWifi { diff --git a/src/framework/AuthClient.h b/src/framework/AuthClient.h index e746c09..6d981eb 100644 --- a/src/framework/AuthClient.h +++ b/src/framework/AuthClient.h @@ -6,11 +6,11 @@ #define UCENTRALGW_AUTHCLIENT_H #include "Poco/JSON/Object.h" +#include "Poco/JWT/Signer.h" #include "Poco/Net/HTTPServerRequest.h" #include "Poco/Net/HTTPServerResponse.h" -#include "Poco/JWT/Signer.h" #include "Poco/SHA2Engine.h" -#include "../RESTAPI/RESTAPI_SecurityObjects.h" +#include "RESTAPI/RESTAPI_SecurityObjects.h" #include "SubSystemServer.h" namespace OpenWifi { diff --git a/src/framework/KafkaManager.cpp b/src/framework/KafkaManager.cpp index 080acb2..4fc90d8 100644 --- a/src/framework/KafkaManager.cpp +++ b/src/framework/KafkaManager.cpp @@ -9,7 +9,7 @@ #include "KafkaManager.h" -#include "../Daemon.h" +#include "Daemon.h" #include "Utils.h" namespace OpenWifi { diff --git a/src/framework/KafkaManager.h b/src/framework/KafkaManager.h index c05d615..b084aff 100644 --- a/src/framework/KafkaManager.h +++ b/src/framework/KafkaManager.h @@ -13,7 +13,7 @@ #include #include "SubSystemServer.h" -#include "framework/OpenWifiTypes.h" +#include "OpenWifiTypes.h" #include "cppkafka/cppkafka.h" diff --git a/src/framework/Kafka_topics.h b/src/framework/Kafka_topics.h index 3fe1a9a..d2b7348 100644 --- a/src/framework/Kafka_topics.h +++ b/src/framework/Kafka_topics.h @@ -1,7 +1,10 @@ // -// Created by stephane bourque on 2021-06-07. +// License type: BSD 3-Clause License +// License copy: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/LICENSE +// +// Created by Stephane Bourque on 2021-03-04. +// Arilia Wireless Inc. // - #ifndef UCENTRALGW_KAFKA_TOPICS_H #define UCENTRALGW_KAFKA_TOPICS_H diff --git a/src/framework/MicroService.cpp b/src/framework/MicroService.cpp index c6d355a..8115c82 100644 --- a/src/framework/MicroService.cpp +++ b/src/framework/MicroService.cpp @@ -26,7 +26,7 @@ #include "Poco/JSON/Parser.h" #include "Poco/JSON/Stringifier.h" -#include "ALBHealthCheckServer.h" +#include "framework/ALBHealthCheckServer.h" #ifndef SMALL_BUILD #include "KafkaManager.h" #endif @@ -36,7 +36,7 @@ #include "Utils.h" #ifndef TIP_SECURITY_SERVICE -#include "AuthClient.h" +#include "framework/AuthClient.h" #endif namespace OpenWifi { diff --git a/src/framework/OpenAPIRequest.cpp b/src/framework/OpenAPIRequest.cpp index a04ff4f..f438947 100644 --- a/src/framework/OpenAPIRequest.cpp +++ b/src/framework/OpenAPIRequest.cpp @@ -18,7 +18,7 @@ #include #include #include "Utils.h" -#include "../Daemon.h" +#include "Daemon.h" namespace OpenWifi { diff --git a/src/framework/RESTAPI_GenericServer.h b/src/framework/RESTAPI_GenericServer.h index 7c8ff10..a97d0e1 100644 --- a/src/framework/RESTAPI_GenericServer.h +++ b/src/framework/RESTAPI_GenericServer.h @@ -8,7 +8,7 @@ #include #include -#include "../Daemon.h" +#include "Daemon.h" #include "Poco/StringTokenizer.h" #include "Poco/Net/HTTPRequest.h" diff --git a/src/framework/RESTAPI_errors.h b/src/framework/RESTAPI_errors.h index 0d43f2c..3fa041e 100644 --- a/src/framework/RESTAPI_errors.h +++ b/src/framework/RESTAPI_errors.h @@ -50,8 +50,10 @@ namespace OpenWifi::RESTAPI::Errors { static const std::string InvalidPassword{"Invalid password."}; static const std::string PasswordRejected{"Password was rejected. This maybe an old password."}; static const std::string InvalidIPRanges{"Invalid IP range specifications."}; + static const std::string InvalidLOrderBy{"Invalid orderBy specification."}; static const std::string NeedMobileNumber{"You must provide at least one validated phone number."}; static const std::string BadMFAMethod{"MFA only supports sms or email."}; + } #endif //OWPROV_RESTAPI_ERRORS_H diff --git a/src/framework/RESTAPI_handler.cpp b/src/framework/RESTAPI_handler.cpp index b3ea1d6..33e1a47 100644 --- a/src/framework/RESTAPI_handler.cpp +++ b/src/framework/RESTAPI_handler.cpp @@ -20,15 +20,15 @@ #include "RESTAPI_errors.h" #ifdef TIP_SECURITY_SERVICE -#include "../AuthService.h" +#include "AuthService.h" #else -#include "AuthClient.h" +#include "framework/AuthClient.h" #endif #include "RESTAPI_handler.h" #include "RESTAPI_protocol.h" #include "Utils.h" -#include "../Daemon.h" +#include "Daemon.h" namespace OpenWifi { diff --git a/src/framework/RESTAPI_handler.h b/src/framework/RESTAPI_handler.h index 494f7b4..a2fab0e 100644 --- a/src/framework/RESTAPI_handler.h +++ b/src/framework/RESTAPI_handler.h @@ -24,7 +24,7 @@ #include "Poco/CountingStream.h" #include "Poco/NullStream.h" -#include "../RESTAPI/RESTAPI_SecurityObjects.h" +#include "RESTAPI/RESTAPI_SecurityObjects.h" #include "RESTAPI_utils.h" #include "RESTAPI_GenericServer.h" diff --git a/src/framework/RESTAPI_system_command.cpp b/src/framework/RESTAPI_system_command.cpp index 463ef0d..bc89151 100644 --- a/src/framework/RESTAPI_system_command.cpp +++ b/src/framework/RESTAPI_system_command.cpp @@ -12,9 +12,9 @@ #include "Poco/DateTime.h" #include "Poco/DateTimeFormat.h" -#include "../Daemon.h" -#include "RESTAPI_protocol.h" -#include "RESTAPI_errors.h" +#include "Daemon.h" +#include "framework/RESTAPI_protocol.h" +#include "framework/RESTAPI_errors.h" #include #include diff --git a/src/framework/RESTAPI_system_command.h b/src/framework/RESTAPI_system_command.h index 060a3e6..9c95f85 100644 --- a/src/framework/RESTAPI_system_command.h +++ b/src/framework/RESTAPI_system_command.h @@ -9,7 +9,7 @@ #ifndef UCENTRALGW_RESTAPI_SYSTEM_COMMAND_H #define UCENTRALGW_RESTAPI_SYSTEM_COMMAND_H -#include "RESTAPI_handler.h" +#include "framework/RESTAPI_handler.h" namespace OpenWifi { class RESTAPI_system_command : public RESTAPIHandler { diff --git a/src/framework/RESTAPI_utils.h b/src/framework/RESTAPI_utils.h index 9a0f54e..0600b43 100644 --- a/src/framework/RESTAPI_utils.h +++ b/src/framework/RESTAPI_utils.h @@ -9,8 +9,8 @@ #include "Poco/JSON/Object.h" #include "Poco/JSON/Parser.h" #include "Poco/Net/HTTPServerRequest.h" -#include "OpenWifiTypes.h" -#include "Utils.h" +#include "framework/OpenWifiTypes.h" +#include "framework/Utils.h" namespace OpenWifi::RESTAPI_utils { diff --git a/src/framework/SubSystemServer.cpp b/src/framework/SubSystemServer.cpp index 57ae592..97bf2f9 100644 --- a/src/framework/SubSystemServer.cpp +++ b/src/framework/SubSystemServer.cpp @@ -7,7 +7,7 @@ // #include "SubSystemServer.h" -#include "../Daemon.h" +#include "Daemon.h" #include "Poco/Net/X509Certificate.h" #include "Poco/DateTimeFormatter.h" @@ -17,7 +17,7 @@ #include "openssl/ssl.h" -#include "../Daemon.h" +#include "Daemon.h" namespace OpenWifi { SubSystemServer::SubSystemServer(std::string Name, const std::string &LoggingPrefix, diff --git a/src/framework/Utils.cpp b/src/framework/Utils.cpp index f61d087..37d0308 100644 --- a/src/framework/Utils.cpp +++ b/src/framework/Utils.cpp @@ -29,7 +29,7 @@ #include "Poco/Net/HTTPResponse.h" #include "uCentralProtocol.h" -#include "../Daemon.h" +#include "Daemon.h" namespace OpenWifi::Utils { diff --git a/src/framework/storage_setup.cpp b/src/framework/storage_setup.cpp index be11994..b5e6dd9 100644 --- a/src/framework/storage_setup.cpp +++ b/src/framework/storage_setup.cpp @@ -2,8 +2,8 @@ // Created by stephane bourque on 2021-08-22. // -#include "../StorageService.h" -#include "../Daemon.h" +#include "StorageService.h" +#include "Daemon.h" namespace OpenWifi {