From c6c62b0152b3ef837f3d7341f045f5457fa096d2 Mon Sep 17 00:00:00 2001 From: Peter M. Groen Date: Fri, 11 Feb 2022 20:31:04 +0100 Subject: [PATCH] Preparating for public interface --- include/mqttpublisherbase.h | 0 include/mqttsubscriberbase.h | 0 src/CMakeLists.txt | 3 +++ src/compat-chrono.h | 4 ++++ src/mqttpublisherbase.cpp | 0 src/mqttsubscriberbase.cpp | 0 6 files changed, 7 insertions(+), 0 deletions(-) create mode 100644 include/mqttpublisherbase.h create mode 100644 include/mqttsubscriberbase.h create mode 100644 src/mqttpublisherbase.cpp create mode 100644 src/mqttsubscriberbase.cpp diff --git a/include/mqttpublisherbase.h b/include/mqttpublisherbase.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/include/mqttpublisherbase.h diff --git a/include/mqttsubscriberbase.h b/include/mqttsubscriberbase.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/include/mqttsubscriberbase.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 543ce86..34432bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,9 +31,12 @@ include(compiler) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../logutils + ${CMAKE_CURRENT_SOURCE_DIR}/../include ) set(SRC_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/mqttpublisherbase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mqttsubscriberbase.cpp ${CMAKE_CURRENT_SOURCE_DIR}/clientpaho.cpp ${CMAKE_CURRENT_SOURCE_DIR}/commondefs.cpp ${CMAKE_CURRENT_SOURCE_DIR}/connectionstatus.cpp diff --git a/src/compat-chrono.h b/src/compat-chrono.h index cec6df8..c383852 100644 --- a/src/compat-chrono.h +++ b/src/compat-chrono.h @@ -48,7 +48,11 @@ To ceil(const std::chrono::duration& d) { To t = std::chrono::duration_cast(d); if (t < d) + { return t + To{ 1 }; + } + + // or else... return t; } diff --git a/src/mqttpublisherbase.cpp b/src/mqttpublisherbase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/mqttpublisherbase.cpp diff --git a/src/mqttsubscriberbase.cpp b/src/mqttsubscriberbase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/mqttsubscriberbase.cpp -- libgit2 0.21.4