Skip to content

Commit

Permalink
#includes revision and housekeeping
Browse files Browse the repository at this point in the history
Summary: related to T13767

Reviewers: ivica

Reviewed By: ivica

Subscribers: iljazovic, miljen

Differential Revision: https://repo.mireo.local/D31700
  • Loading branch information
ksimicevic committed Oct 8, 2024
1 parent 0d9bb94 commit 4cbae10
Show file tree
Hide file tree
Showing 68 changed files with 364 additions and 59 deletions.
2 changes: 1 addition & 1 deletion example/hello_world_over_tls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct tls_handshake_type<boost::asio::ssl::stream<StreamBase>> {
template <typename StreamBase>
void assign_tls_sni(
const authority_path& ap,
boost::asio::ssl::context& ctx,
boost::asio::ssl::context& /* ctx */,
boost::asio::ssl::stream<StreamBase>& stream
) {
SSL_set_tlsext_host_name(stream.native_handle(), ap.host.c_str());
Expand Down
2 changes: 2 additions & 0 deletions example/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
//

//[publisher
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <string>

#include <boost/asio/as_tuple.hpp>
#include <boost/asio/co_spawn.hpp>
Expand Down
1 change: 1 addition & 0 deletions example/timeout_with_awaitable_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

//[timeout_with_awaitable_operators
#include <chrono>
#include <iostream>

#include <boost/asio/as_tuple.hpp>
Expand Down
5 changes: 5 additions & 0 deletions example/timeout_with_parallel_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
//

//[timeout_with_parallel_group
#include <array>
#include <chrono>
#include <iostream>
#include <string>
#include <vector>

#include <boost/asio/io_context.hpp>
#include <boost/asio/deferred.hpp>
#include <boost/asio/detached.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/experimental/parallel_group.hpp>
#include <boost/asio/ip/tcp.hpp>
Expand Down
8 changes: 7 additions & 1 deletion include/async_mqtt5/detail/any_authenticator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
#ifndef ASYNC_MQTT5_ANY_AUTHENTICATOR
#define ASYNC_MQTT5_ANY_AUTHENTICATOR

#include <memory>
#include <string>
#include <string_view>
#include <type_traits>

#include <boost/asio/any_completion_handler.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/system/error_code.hpp>

#include <boost/type_traits/is_detected.hpp>
#include <boost/type_traits/is_detected_convertible.hpp>
Expand All @@ -22,7 +28,7 @@ namespace asio = boost::asio;
using error_code = boost::system::error_code;

using auth_handler_type = asio::any_completion_handler<
void (error_code ec, std::string auth_data)
void (error_code, std::string)
>;

template <typename T, typename ...Ts>
Expand Down
6 changes: 6 additions & 0 deletions include/async_mqtt5/detail/async_mutex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@
#ifndef ASYNC_MQTT5_ASYNC_MUTEX_HPP
#define ASYNC_MQTT5_ASYNC_MUTEX_HPP

#include <atomic>
#include <deque>
#include <mutex>

#include <boost/asio/any_completion_handler.hpp>
#include <boost/asio/any_io_executor.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/associated_cancellation_slot.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/bind_cancellation_slot.hpp>
#include <boost/asio/execution.hpp>
#include <boost/asio/require.hpp>
#include <boost/system/error_code.hpp>

#include <async_mqtt5/detail/async_traits.hpp>
#include <async_mqtt5/detail/spinlock.hpp>
Expand Down
1 change: 1 addition & 0 deletions include/async_mqtt5/detail/channel_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define ASYNC_MQTT5_CHANNEL_TRAITS_HPP

#include <deque>
#include <type_traits>

#include <boost/asio/error.hpp>

Expand Down
4 changes: 4 additions & 0 deletions include/async_mqtt5/detail/control_packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#define ASYNC_MQTT5_CONTROL_PACKET_HPP

#include <algorithm>
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include <boost/smart_ptr/allocate_unique.hpp>
Expand Down
3 changes: 2 additions & 1 deletion include/async_mqtt5/detail/internal_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
#ifndef ASYNC_MQTT5_INTERNAL_TYPES_HPP
#define ASYNC_MQTT5_INTERNAL_TYPES_HPP

#include <chrono>
#include <cstdint>
#include <optional>
#include <string>
#include <shared_mutex>

#include <async_mqtt5/detail/any_authenticator.hpp>

Expand Down
3 changes: 2 additions & 1 deletion include/async_mqtt5/detail/topic_validation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#ifndef ASYNC_MQTT5_TOPIC_VALIDATION_HPP
#define ASYNC_MQTT5_TOPIC_VALIDATION_HPP

#include <string>
#include <cstdint>
#include <string_view>

#include <async_mqtt5/detail/utf8_mqtt.hpp>

Expand Down
3 changes: 3 additions & 0 deletions include/async_mqtt5/detail/utf8_mqtt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
#ifndef ASYNC_MQTT5_UTF8_MQTT_HPP
#define ASYNC_MQTT5_UTF8_MQTT_HPP

#include <cstdint>
#include <string>
#include <string_view>
#include <utility>

namespace async_mqtt5::detail {

Expand Down
4 changes: 4 additions & 0 deletions include/async_mqtt5/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef ASYNC_MQTT5_ERROR_HPP
#define ASYNC_MQTT5_ERROR_HPP

#include <cstdint>
#include <ostream>
#include <string>

#include <boost/asio/error.hpp>

namespace async_mqtt5 {
Expand Down
5 changes: 4 additions & 1 deletion include/async_mqtt5/impl/assemble_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
#ifndef ASYNC_MQTT5_ASSEMBLE_OP_HPP
#define ASYNC_MQTT5_ASSEMBLE_OP_HPP

#include <chrono>
#include <cstdint>
#include <string>
#include <utility>

#include <boost/asio/append.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/completion_condition.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/system/error_code.hpp>

#include <async_mqtt5/error.hpp>

Expand Down
10 changes: 9 additions & 1 deletion include/async_mqtt5/impl/async_sender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
#ifndef ASYNC_MQTT5_ASYNC_SENDER_HPP
#define ASYNC_MQTT5_ASYNC_SENDER_HPP

#include <algorithm>
#include <cstdint>
#include <utility>
#include <vector>

#include <boost/asio/any_completion_handler.hpp>
#include <boost/asio/any_io_executor.hpp>
#include <boost/asio/bind_allocator.hpp>
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/recycling_allocator.hpp>
#include <boost/system/error_code.hpp>

#include <async_mqtt5/detail/internal_types.hpp>

Expand Down
6 changes: 6 additions & 0 deletions include/async_mqtt5/impl/autoconnect_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
#ifndef ASYNC_MQTT5_AUTOCONNECT_STREAM_HPP
#define ASYNC_MQTT5_AUTOCONNECT_STREAM_HPP

#include <cstdint>
#include <memory>
#include <string>
#include <utility>

#include <boost/asio/async_result.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/system/error_code.hpp>

#include <async_mqtt5/detail/async_mutex.hpp>
#include <async_mqtt5/detail/async_traits.hpp>
Expand Down
10 changes: 9 additions & 1 deletion include/async_mqtt5/impl/client_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@
#ifndef ASYNC_MQTT5_CLIENT_SERVICE_HPP
#define ASYNC_MQTT5_CLIENT_SERVICE_HPP

#include <cstdint>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

#include <boost/asio/async_result.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/asio/experimental/basic_channel.hpp>

#include <async_mqtt5/types.hpp>

#include <async_mqtt5/detail/channel_traits.hpp>
#include <async_mqtt5/detail/internal_types.hpp>

Expand All @@ -24,7 +33,6 @@
#include <async_mqtt5/impl/replies.hpp>
#include <async_mqtt5/impl/sentry_op.hpp>


namespace async_mqtt5::detail {

namespace asio = boost::asio;
Expand Down
6 changes: 6 additions & 0 deletions include/async_mqtt5/impl/codecs/base_decoders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
#ifndef ASYNC_MQTT5_BASE_DECODERS_HPP
#define ASYNC_MQTT5_BASE_DECODERS_HPP

#include <cstdint>
#include <string>
#include <utility>

#include <boost/spirit/home/x3.hpp>
#include <boost/spirit/home/x3/binary/binary.hpp>
#include <boost/fusion/adapted/std_tuple.hpp>
#include <boost/fusion/container/deque.hpp>
#include <boost/optional/optional.hpp>

#include <async_mqtt5/property_types.hpp>
#include <async_mqtt5/impl/codecs/traits.hpp>
Expand Down
3 changes: 3 additions & 0 deletions include/async_mqtt5/impl/codecs/base_encoders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#include <cstddef>
#include <cstdint>
#include <string>
#include <type_traits>
#include <utility>

#include <boost/core/identity.hpp>
#include <boost/endian/conversion.hpp>
Expand Down
4 changes: 4 additions & 0 deletions include/async_mqtt5/impl/codecs/message_decoders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
#define ASYNC_MQTT5_MESSAGE_DECODERS_HPP

#include <cstdint>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include <async_mqtt5/types.hpp>
#include <async_mqtt5/detail/internal_types.hpp>
#include <async_mqtt5/impl/codecs/base_decoders.hpp>

Expand Down
5 changes: 4 additions & 1 deletion include/async_mqtt5/impl/codecs/message_encoders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
#ifndef ASYNC_MQTT5_MESSAGE_ENCODERS_HPP
#define ASYNC_MQTT5_MESSAGE_ENCODERS_HPP

#include <string>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

#include <async_mqtt5/types.hpp>
#include <async_mqtt5/impl/codecs/base_encoders.hpp>
Expand Down
4 changes: 1 addition & 3 deletions include/async_mqtt5/impl/codecs/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

#include <optional>
#include <vector>
#include <utility>

#include <boost/container/small_vector.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/type_traits/remove_cv_ref.hpp>


namespace async_mqtt5 {

template <typename>
Expand Down Expand Up @@ -58,8 +58,6 @@ constexpr bool is_boost_iterator = is_specialization<
boost::remove_cv_ref_t<T>, boost::iterator_range
>;



} // end namespace async_mqtt5

#endif // !ASYNC_MQTT5_TRAITS_HPP
11 changes: 8 additions & 3 deletions include/async_mqtt5/impl/connect_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#ifndef ASYNC_MQTT5_CONNECT_OP_HPP
#define ASYNC_MQTT5_CONNECT_OP_HPP

#include <cstdint>
#include <memory>
#include <string>

#include <boost/asio/any_completion_handler.hpp>
#include <boost/asio/append.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/associated_executor.hpp>
Expand All @@ -16,11 +21,11 @@
#include <boost/asio/consign.hpp>
#include <boost/asio/completion_condition.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/asio/read.hpp>
#include <boost/asio/write.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/any_completion_handler.hpp>

#include <boost/beast/http/field.hpp>
#include <boost/beast/websocket/rfc6455.hpp>
Expand Down Expand Up @@ -74,8 +79,8 @@ class connect_op {
_handler(std::forward<Handler>(handler)),
_cancellation_state(
asio::get_associated_cancellation_slot(_handler),
asio::enable_total_cancellation{},
asio::enable_total_cancellation{}
asio::enable_total_cancellation {},
asio::enable_total_cancellation {}
)
{}

Expand Down
6 changes: 6 additions & 0 deletions include/async_mqtt5/impl/disconnect_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
#ifndef ASYNC_MQTT5_DISCONNECT_OP_HPP
#define ASYNC_MQTT5_DISCONNECT_OP_HPP

#include <cstdint>
#include <memory>

#include <boost/asio/any_completion_handler.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associated_cancellation_slot.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/consign.hpp>
#include <boost/asio/deferred.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/experimental/parallel_group.hpp>
Expand Down
7 changes: 6 additions & 1 deletion include/async_mqtt5/impl/endpoints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
#ifndef ASYNC_MQTT5_ENDPOINTS_HPP
#define ASYNC_MQTT5_ENDPOINTS_HPP

#include <array>
#include <chrono>
#include <string>

#include <boost/asio/append.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associated_cancellation_slot.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/deferred.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/prepend.hpp>
#include <boost/asio/ip/tcp.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/async_mqtt5/impl/ping_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ping_op {
}

using cancellation_slot_type = asio::cancellation_slot;
asio::cancellation_slot get_cancellation_slot() const noexcept {
cancellation_slot_type get_cancellation_slot() const noexcept {
return _cancellation_state.slot();
}

Expand Down
Loading

0 comments on commit 4cbae10

Please sign in to comment.