diff --git a/include/channel.h b/include/channel.h index 6f24a86..618a314 100644 --- a/include/channel.h +++ b/include/channel.h @@ -334,11 +334,6 @@ public: /** * Publish a message to an exchange * - * If either of the two flags is set, and the message could not immediately - * be published, the message is returned by the server to the client. If you - * want to catch such returned messages, you need to install a handler using - * the onReturned() method. - * * @param exchange the exchange to publish to * @param routingkey the routing key * @param envelope the full envelope to send diff --git a/include/deferredcancel.h b/include/deferredcancel.h index 244e145..0c1f8e6 100644 --- a/include/deferredcancel.h +++ b/include/deferredcancel.h @@ -75,9 +75,17 @@ public: } /** - * All the onSuccess() functions defined in the base class are accessible too + * Register the function that is called when the cancel operation succeeded + * @param callback */ - using Deferred::onSuccess; + DeferredCancel &onSuccess(const SuccessCallback &callback) + { + // call base + Deferred::onSuccess(callback); + + // allow chaining + return *this; + } }; /** diff --git a/include/deferredconsumer.h b/include/deferredconsumer.h index ee82068..c656728 100644 --- a/include/deferredconsumer.h +++ b/include/deferredconsumer.h @@ -75,6 +75,19 @@ public: return *this; } + /** + * Register the function that is called when the consumer starts + * @param callback + */ + DeferredConsumer &onSuccess(const SuccessCallback &callback) + { + // call base + Deferred::onSuccess(callback); + + // allow chaining + return *this; + } + /** * Register a function to be called when a message arrives * This fuction is also available as onMessage() because I always forget which name I gave to it @@ -102,11 +115,6 @@ public: // allow chaining return *this; } - - /** - * All the onSuccess() functions defined in the base class are accessible too - */ - using Deferred::onSuccess; }; /** diff --git a/include/deferreddelete.h b/include/deferreddelete.h index 43ada61..aa0d83e 100644 --- a/include/deferreddelete.h +++ b/include/deferreddelete.h @@ -80,9 +80,17 @@ public: } /** - * All the onSuccess() functions defined in the base class are accessible too + * Register the function that is called when the queue is deleted or purged + * @param callback */ - using Deferred::onSuccess; + DeferredDelete &onSuccess(const SuccessCallback &callback) + { + // call base + Deferred::onSuccess(callback); + + // allow chaining + return *this; + } }; /** diff --git a/include/deferredqueue.h b/include/deferredqueue.h index 085f095..6b5d930 100644 --- a/include/deferredqueue.h +++ b/include/deferredqueue.h @@ -80,9 +80,17 @@ public: } /** - * All the onSuccess() functions defined in the base class are accessible too + * Register the function that is called when the queue is declared + * @param callback */ - using Deferred::onSuccess; + DeferredQueue &onSuccess(const SuccessCallback &callback) + { + // call base + Deferred::onSuccess(callback); + + // allow chaining + return *this; + } }; /**