/** * Callbacks.h * * Class storing deferred callbacks of different type. * * @copyright 2014 - 2018 Copernica BV */ /** * Include guard */ #pragma once /** * Dependencies */ #include #include /** * Set up namespace */ namespace AMQP { /** * Forward declarations */ class Message; class MetaData; /** * Generic callbacks that are used by many deferred objects */ using SuccessCallback = std::function; using ErrorCallback = std::function; using FinalizeCallback = std::function; /** * Declaring and deleting a queue */ using QueueCallback = std::function; using DeleteCallback = std::function; /** * When retrieving the size of a queue in some way */ using EmptyCallback = std::function; using CountCallback = std::function; using SizeCallback = std::function; /** * Starting and stopping a consumer */ using ConsumeCallback = std::function; using CancelCallback = std::function; /** * Receiving messages, either via consume(), get() or as returned messages * The following methods receive the returned message in multiple parts */ using StartCallback = std::function; using HeaderCallback = std::function; using DataCallback = std::function; using DeliveredCallback = std::function; /** * For returned messages amqp-cpp first calls a return-callback before the start, * header and data callbacks are called. Instead of the deliver-callback, a * returned-callback is called. */ using ReturnCallback = std::function; using ReturnedCallback = std::function; /** * If you do not want to merge all data into a single string, you can als * implement callbacks that return the collected message. */ using MessageCallback = std::function; using BounceCallback = std::function; /** * When using publisher confirms, AckCallback is called when server confirms that message is received * and processed. NackCallback is called otherwise. */ using AckCallback = std::function; using NackCallback = std::function; /** * When using a confirm wrapped channel, these callbacks are called when a message is acknowledged/nacked. */ using PublishAckCallback = std::function; using PublishNackCallback = std::function; using PublishLostCallback = std::function; /** * End namespace */ }