From 29054b4f3c6c290ef46610cc4d2c48fb3a65d239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Korina=20=C5=A0imi=C4=8Devi=C4=87?= Date: Thu, 22 Feb 2024 08:09:49 +0100 Subject: [PATCH] Move any_authenticator, control_packet and pid_allocator to detail namespace Summary: related to T13767 Reviewers: ivica Reviewed By: ivica Subscribers: miljen, iljazovic Differential Revision: https://repo.mireo.local/D28084 --- include/async_mqtt5/detail/any_authenticator.hpp | 8 ++------ include/async_mqtt5/detail/control_packet.hpp | 4 ++-- test/include/test_common/packet_util.hpp | 2 ++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/async_mqtt5/detail/any_authenticator.hpp b/include/async_mqtt5/detail/any_authenticator.hpp index 4d1eb1f..8a3e5a8 100644 --- a/include/async_mqtt5/detail/any_authenticator.hpp +++ b/include/async_mqtt5/detail/any_authenticator.hpp @@ -9,13 +9,11 @@ #include -namespace async_mqtt5 { +namespace async_mqtt5::detail { namespace asio = boost::asio; using error_code = boost::system::error_code; -namespace detail { - using auth_handler_type = asio::any_completion_handler< void (error_code ec, std::string auth_data) >; @@ -80,8 +78,6 @@ public: } }; -} // end namespace detail - class any_authenticator { std::string _method; std::shared_ptr _auth_fun; @@ -128,7 +124,7 @@ public: } }; -} // end namespace async_mqtt5 +} // end namespace async_mqtt5::detail #endif // !ASYNC_MQTT5_ANY_AUTHENTICATOR diff --git a/include/async_mqtt5/detail/control_packet.hpp b/include/async_mqtt5/detail/control_packet.hpp index ec5139e..27386d5 100644 --- a/include/async_mqtt5/detail/control_packet.hpp +++ b/include/async_mqtt5/detail/control_packet.hpp @@ -7,7 +7,7 @@ #include -namespace async_mqtt5 { +namespace async_mqtt5::detail { /* max varint number (268'435'455) + fixed header size (1 + 4) */ static constexpr int32_t default_max_send_size = 268'435'460; @@ -167,6 +167,6 @@ public: } }; -} // end namespace async_mqtt5 +} // end namespace async_mqtt5::detail #endif // !ASYNC_MQTT5_CONTROL_PACKET_HPP diff --git a/test/include/test_common/packet_util.hpp b/test/include/test_common/packet_util.hpp index 4194a79..644411d 100644 --- a/test/include/test_common/packet_util.hpp +++ b/test/include/test_common/packet_util.hpp @@ -15,6 +15,8 @@ namespace async_mqtt5::test { +using control_code_e = async_mqtt5::detail::control_code_e; + template std::string concat_strings(Strings&&... strings) { std::ostringstream stream;