12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- /*
- * Copyright (c) 2017-2023 zhllxt
- *
- * author : zhllxt
- * email : 37792738@qq.com
- *
- * Distributed under the Boost Software License, Version 1.0. (See accompanying
- * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
- #ifndef __ASIO2_MQTT_AOP_PUBCOMP_HPP__
- #define __ASIO2_MQTT_AOP_PUBCOMP_HPP__
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- #pragma once
- #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
- #include <asio2/base/iopool.hpp>
- #include <asio2/base/detail/function_traits.hpp>
- #include <asio2/base/detail/util.hpp>
- #include <asio2/mqtt/message.hpp>
- namespace asio2::detail
- {
- template<class caller_t, class args_t>
- class mqtt_aop_pubcomp
- {
- friend caller_t;
- protected:
- // server or client
- inline void _before_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v3::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- // server or client
- inline void _before_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v4::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- // server or client
- inline void _before_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v5::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- inline void _after_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v3::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- inline void _after_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v4::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- inline void _after_user_callback_impl(
- error_code& ec, std::shared_ptr<caller_t>& caller_ptr, caller_t* caller, mqtt::message& om,
- mqtt::v5::pubcomp& msg)
- {
- detail::ignore_unused(ec, caller_ptr, caller, om, msg);
- }
- };
- }
- #endif // !__ASIO2_MQTT_AOP_PUBCOMP_HPP__
|