2014-04-08 20:42:07 +08:00
|
|
|
/**
|
|
|
|
|
* Callbacks.h
|
|
|
|
|
*
|
|
|
|
|
* Class storing deferred callbacks of different type.
|
|
|
|
|
*
|
|
|
|
|
* @copyright 2014 Copernica BV
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set up namespace
|
|
|
|
|
*/
|
|
|
|
|
namespace AMQP {
|
|
|
|
|
|
|
|
|
|
/**
|
2014-04-15 16:43:33 +08:00
|
|
|
* All the callbacks that are supported
|
|
|
|
|
*
|
|
|
|
|
* When someone registers a callback function for certain events, it should
|
|
|
|
|
* match one of the following signatures.
|
2014-04-08 20:42:07 +08:00
|
|
|
*/
|
2014-04-15 16:43:33 +08:00
|
|
|
using SuccessCallback = std::function<void()>;
|
|
|
|
|
using ErrorCallback = std::function<void(const char *message)>;
|
|
|
|
|
using FinalizeCallback = std::function<void()>;
|
|
|
|
|
using ConsumeCallback = std::function<void(const Message &message, uint64_t deliveryTag, const std::string &consumerTag, bool redelivered)>;
|
|
|
|
|
using QueueCallback = std::function<void(const std::string &name, uint32_t messagecount, uint32_t consumercount)>;
|
|
|
|
|
using DeleteCallback = std::function<void(uint32_t deletedmessages)>;
|
|
|
|
|
using CancelCallback = std::function<void(const std::string &consumer)>;
|
2014-04-08 20:42:07 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* End namespace
|
|
|
|
|
*/
|
|
|
|
|
}
|