From 5ec49d5b8a85a908700c8f4f390c475f1aeba3b2 Mon Sep 17 00:00:00 2001 From: Dirkco du Plessis Date: Mon, 23 Apr 2018 08:30:37 +0100 Subject: [PATCH] Added CountCallback to support 32bit unsigned int passed in defferedget. --- include/amqpcpp/callbacks.h | 3 ++- include/amqpcpp/deferredget.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/amqpcpp/callbacks.h b/include/amqpcpp/callbacks.h index 66fef0d..e1881f7 100644 --- a/include/amqpcpp/callbacks.h +++ b/include/amqpcpp/callbacks.h @@ -45,7 +45,8 @@ using DeleteCallback = std::function; * When retrieving the size of a queue in some way */ using EmptyCallback = std::function; -using SizeCallback = std::function; +using CountCallback = std::function; +using SizeCallback = std::function; /** * Starting and stopping a consumer diff --git a/include/amqpcpp/deferredget.h b/include/amqpcpp/deferredget.h index 78332be..5f5716f 100644 --- a/include/amqpcpp/deferredget.h +++ b/include/amqpcpp/deferredget.h @@ -38,9 +38,9 @@ private: /** * Callback with the number of messages still in the queue - * @var SizeCallback + * @var CountCallback */ - SizeCallback _countCallback; + CountCallback _countCallback; /** * Report success for a get operation @@ -149,7 +149,7 @@ public: * Register a function to be called when queue size information is known * @param callback the callback to execute */ - DeferredGet &onCount(const SizeCallback &callback) + DeferredGet &onCount(const CountCallback &callback) { // store callback _countCallback = callback;