From 959eb9035bb404f5e02d1f068eafa6d250e1f8c4 Mon Sep 17 00:00:00 2001 From: Muhammad Kamal Nadjieb Date: Sat, 16 Nov 2024 09:46:30 +0700 Subject: [PATCH] reduced code changes --- single_include/nadjieb/mjpeg_streamer.hpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/single_include/nadjieb/mjpeg_streamer.hpp b/single_include/nadjieb/mjpeg_streamer.hpp index 8fd1f4a..e864f17 100644 --- a/single_include/nadjieb/mjpeg_streamer.hpp +++ b/single_include/nadjieb/mjpeg_streamer.hpp @@ -29,6 +29,7 @@ SOFTWARE. // #include + /// The major version number #define NADJIEB_MJPEG_STREAMER_VERSION_MAJOR 3 @@ -39,15 +40,15 @@ SOFTWARE. #define NADJIEB_MJPEG_STREAMER_VERSION_PATCH 0 /// The complete version number -#define NADJIEB_MJPEG_STREAMER_VERSION_CODE \ - (NADJIEB_MJPEG_STREAMER_VERSION_MAJOR * 10000 + NADJIEB_MJPEG_STREAMER_VERSION_MINOR * 100 \ - + NADJIEB_MJPEG_STREAMER_VERSION_PATCH) +#define NADJIEB_MJPEG_STREAMER_VERSION_CODE (NADJIEB_MJPEG_STREAMER_VERSION_MAJOR * 10000 + NADJIEB_MJPEG_STREAMER_VERSION_MINOR * 100 + NADJIEB_MJPEG_STREAMER_VERSION_PATCH) /// Version number as string #define NADJIEB_MJPEG_STREAMER_VERSION_STRING "3.0.0" + // #include + #include #include #include @@ -111,6 +112,7 @@ class HTTPRequest { // #include + #include #include #include @@ -154,10 +156,13 @@ class HTTPResponse { // #include + // #include + // #include + #if defined _MSC_VER || defined __MINGW32__ #define NADJIEB_MJPEG_STREAMER_PLATFORM_WINDOWS #elif defined __APPLE_CC__ || defined __APPLE__ @@ -166,6 +171,7 @@ class HTTPResponse { #define NADJIEB_MJPEG_STREAMER_PLATFORM_LINUX #endif + #ifdef NADJIEB_MJPEG_STREAMER_PLATFORM_WINDOWS #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN @@ -333,6 +339,7 @@ static int pollSockets(NADJIEB_MJPEG_STREAMER_POLLFD* fds, size_t nfds, long tim // #include + namespace nadjieb { namespace utils { class NonCopyable { @@ -351,6 +358,7 @@ class NonCopyable { // #include + namespace nadjieb { namespace utils { enum class State { UNSPECIFIED = 0, NEW, BOOTING, RUNNING, TERMINATING, TERMINATED }; @@ -366,6 +374,7 @@ class Runnable { } // namespace utils } // namespace nadjieb + #include #include #include @@ -559,12 +568,15 @@ class Listener : public nadjieb::utils::NonCopyable, public nadjieb::utils::Runn // #include + // #include // #include + // #include + #include #include #include @@ -648,6 +660,7 @@ class Topic { // #include + #include #include #include @@ -805,6 +818,7 @@ class Publisher : public nadjieb::utils::NonCopyable, public nadjieb::utils::Run // #include + #include namespace nadjieb {