From 175482412f0d28ab091dca9c375947816ad02c5d Mon Sep 17 00:00:00 2001 From: Sergey Platonov Date: Mon, 12 Dec 2016 15:43:07 +0300 Subject: [PATCH] Method reset() added to a QAmqpChannel class Sometimes user needs to reset the channel state, for example in case of attempt to declare an exisiting queue. --- src/qamqpchannel.cpp | 6 ++++++ src/qamqpchannel.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/qamqpchannel.cpp b/src/qamqpchannel.cpp index cc1a815..99c1f5a 100644 --- a/src/qamqpchannel.cpp +++ b/src/qamqpchannel.cpp @@ -341,6 +341,12 @@ qint16 QAmqpChannel::prefetchCount() const return d->prefetchCount; } +void QAmqpChannel::reset() +{ + Q_D(QAmqpChannel); + d->resetInternalState(); +} + QAMQP::Error QAmqpChannel::error() const { Q_D(const QAmqpChannel); diff --git a/src/qamqpchannel.h b/src/qamqpchannel.h index 2e29b37..42fcef7 100644 --- a/src/qamqpchannel.h +++ b/src/qamqpchannel.h @@ -44,6 +44,8 @@ public: qint32 prefetchSize() const; qint16 prefetchCount() const; + void reset(); + // AMQP Basic void qos(qint16 prefetchCount, qint32 prefetchSize = 0);