Added CountCallback to support 32bit unsigned int passed in defferedget.

This commit is contained in:
Dirkco du Plessis 2018-04-23 08:30:37 +01:00
parent 1479922901
commit 5ec49d5b8a
2 changed files with 5 additions and 4 deletions

View File

@ -45,7 +45,8 @@ using DeleteCallback = std::function<void(uint32_t deletedmessages)>;
* When retrieving the size of a queue in some way
*/
using EmptyCallback = std::function<void()>;
using SizeCallback = std::function<void(uint64_t messagecount)>;
using CountCallback = std::function<void(uint32_t messagecount)>;
using SizeCallback = std::function<void(uint64_t messagesize)>;
/**
* Starting and stopping a consumer

View File

@ -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;