| @@ -13,12 +13,14 @@ namespace cppamqp | |||||
| struct channel | struct channel | ||||
| { | { | ||||
| private: | private: | ||||
| using connection_t = ::cppamqp::connection; | |||||
| struct internal | struct internal | ||||
| { | { | ||||
| const connection& connection; | |||||
| const connection_t& connection; | |||||
| channel_number handle; | channel_number handle; | ||||
| internal(const ::cppamqp::connection& p_connection, channel_number p_handle); | |||||
| internal(const connection_t& p_connection, channel_number p_handle); | |||||
| ~internal(); | ~internal(); | ||||
| }; | }; | ||||
| @@ -27,7 +29,7 @@ namespace cppamqp | |||||
| std::shared_ptr<internal> _internal; | std::shared_ptr<internal> _internal; | ||||
| inline channel(const connection& p_connection, channel_number p_handle); | |||||
| inline channel(const connection_t& p_connection, channel_number p_handle); | |||||
| public: | public: | ||||
| inline channel(); | inline channel(); | ||||
| @@ -38,7 +40,7 @@ namespace cppamqp | |||||
| inline void operator = (channel&& other); | inline void operator = (channel&& other); | ||||
| inline channel_number handle () const; | 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); | 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); | void bind_queue (const std::string& queue, const std::string& exchange, const std::string& routing_key); | ||||
| @@ -13,11 +13,13 @@ namespace cppamqp | |||||
| struct consume_result | struct consume_result | ||||
| { | { | ||||
| private: | private: | ||||
| using message_t = ::cppamqp::message; | |||||
| const connection& _connection; | const connection& _connection; | ||||
| public: | public: | ||||
| consume_result_type type; | consume_result_type type; | ||||
| message message; | |||||
| message_t message; | |||||
| channel_number channel; | channel_number channel; | ||||
| std::string consumer_tag; | std::string consumer_tag; | ||||
| uint64_t delivery_tag; | uint64_t delivery_tag; | ||||
| @@ -10,12 +10,14 @@ namespace cppamqp | |||||
| struct publish_options | struct publish_options | ||||
| { | { | ||||
| private: | private: | ||||
| using delivery_mode_t = ::cppamqp::delivery_mode; | |||||
| mutable amqp_basic_properties_t _properties; | mutable amqp_basic_properties_t _properties; | ||||
| public: | public: | ||||
| utl::nullable<std::string> content_type; | utl::nullable<std::string> content_type; | ||||
| utl::nullable<std::string> content_encoding; | utl::nullable<std::string> content_encoding; | ||||
| utl::nullable<delivery_mode> delivery_mode; | |||||
| utl::nullable<delivery_mode_t> delivery_mode; | |||||
| utl::nullable<uint8_t> priority; | utl::nullable<uint8_t> priority; | ||||
| utl::nullable<std::string> correlation_id; | utl::nullable<std::string> correlation_id; | ||||
| utl::nullable<std::string> reply_to; | utl::nullable<std::string> reply_to; | ||||
| @@ -17,9 +17,9 @@ File ( GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_D | |||||
| Add_Executable ( test_cppamqp EXCLUDE_FROM_ALL ${SOURCE_FILES} ) | Add_Executable ( test_cppamqp EXCLUDE_FROM_ALL ${SOURCE_FILES} ) | ||||
| Target_Link_Libraries ( test_cppamqp | Target_Link_Libraries ( test_cppamqp | ||||
| cppamqp | cppamqp | ||||
| gtest | |||||
| gmock | |||||
| gmock_main | gmock_main | ||||
| gmock | |||||
| gtest | |||||
| pthread ) | pthread ) | ||||
| If ( __COTIRE_INCLUDED ) | If ( __COTIRE_INCLUDED ) | ||||
| Cotire ( test_cppamqp ) | Cotire ( test_cppamqp ) | ||||