diff --git a/include/cppamqp/channel.h b/include/cppamqp/channel.h index 9da0637..a10d126 100644 --- a/include/cppamqp/channel.h +++ b/include/cppamqp/channel.h @@ -13,12 +13,14 @@ namespace cppamqp struct channel { private: + using connection_t = ::cppamqp::connection; + struct internal { - const connection& connection; + const connection_t& connection; channel_number handle; - internal(const ::cppamqp::connection& p_connection, channel_number p_handle); + internal(const connection_t& p_connection, channel_number p_handle); ~internal(); }; @@ -27,7 +29,7 @@ namespace cppamqp std::shared_ptr _internal; - inline channel(const connection& p_connection, channel_number p_handle); + inline channel(const connection_t& p_connection, channel_number p_handle); public: inline channel(); @@ -38,7 +40,7 @@ namespace cppamqp inline void operator = (channel&& other); inline channel_number handle () const; - inline const connection& connection () const; + inline const connection_t& connection () const; queue_declaration declare_queue (const std::string& name, const queue_flags& flags); void bind_queue (const std::string& queue, const std::string& exchange, const std::string& routing_key); diff --git a/include/cppamqp/consume_result.h b/include/cppamqp/consume_result.h index 19b4cf0..cd230f7 100644 --- a/include/cppamqp/consume_result.h +++ b/include/cppamqp/consume_result.h @@ -13,11 +13,13 @@ namespace cppamqp struct consume_result { private: + using message_t = ::cppamqp::message; + const connection& _connection; public: consume_result_type type; - message message; + message_t message; channel_number channel; std::string consumer_tag; uint64_t delivery_tag; diff --git a/include/cppamqp/publish_options.h b/include/cppamqp/publish_options.h index 679e3d0..c9cc750 100644 --- a/include/cppamqp/publish_options.h +++ b/include/cppamqp/publish_options.h @@ -10,12 +10,14 @@ namespace cppamqp struct publish_options { private: + using delivery_mode_t = ::cppamqp::delivery_mode; + mutable amqp_basic_properties_t _properties; public: utl::nullable content_type; utl::nullable content_encoding; - utl::nullable delivery_mode; + utl::nullable delivery_mode; utl::nullable priority; utl::nullable correlation_id; utl::nullable reply_to; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2d86709..3bcaf0b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,9 +17,9 @@ File ( GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_D Add_Executable ( test_cppamqp EXCLUDE_FROM_ALL ${SOURCE_FILES} ) Target_Link_Libraries ( test_cppamqp cppamqp - gtest - gmock gmock_main + gmock + gtest pthread ) If ( __COTIRE_INCLUDED ) Cotire ( test_cppamqp )