add two new properties, changed the name of one

QAmqpQueue and QAmqpExchange both now have an isDeclared property,
and QAmqpChannel::isOpened was renamed to isOpen to more closely follow
Qt style/api guidelines
This commit is contained in:
Matt Broadstone 2015-01-31 12:44:25 -05:00
parent bb13e2e830
commit 009c3131f5
6 changed files with 18 additions and 3 deletions

View File

@ -280,7 +280,7 @@ void QAmqpChannel::setName(const QString &name)
d->name = name;
}
bool QAmqpChannel::isOpened() const
bool QAmqpChannel::isOpen() const
{
Q_D(const QAmqpChannel);
return d->opened;

View File

@ -10,13 +10,13 @@ class QAMQP_EXPORT QAmqpChannel : public QObject
{
Q_OBJECT
Q_PROPERTY(int number READ channelNumber CONSTANT)
Q_PROPERTY(bool opened READ isOpened CONSTANT)
Q_PROPERTY(bool open READ isOpen CONSTANT)
Q_PROPERTY(QString name READ name WRITE setName)
public:
virtual ~QAmqpChannel();
int channelNumber() const;
bool isOpened() const;
bool isOpen() const;
QString name() const;
void setName(const QString &name);

View File

@ -224,6 +224,12 @@ QString QAmqpExchange::type() const
return d->type;
}
bool QAmqpExchange::isDeclared() const
{
Q_D(const QAmqpExchange);
return d->declared;
}
void QAmqpExchange::declare(ExchangeType type, ExchangeOptions options, const QAmqpTable &args)
{
declare(QAmqpExchangePrivate::typeToString(type), options, args);

View File

@ -52,6 +52,8 @@ public:
Q_DECLARE_FLAGS(ExchangeOptions, ExchangeOption)
ExchangeOptions options() const;
bool isDeclared() const;
// AMQP Exchange
void declare(ExchangeType type = Direct,
ExchangeOptions options = NoOptions,

View File

@ -479,6 +479,12 @@ bool QAmqpQueue::isConsuming() const
return d->consuming;
}
bool QAmqpQueue::isDeclared() const
{
Q_D(const QAmqpQueue);
return d->declared;
}
void QAmqpQueue::get(bool noAck)
{
Q_D(QAmqpQueue);

View File

@ -52,6 +52,7 @@ public:
~QAmqpQueue();
bool isConsuming() const;
bool isDeclared() const;
void setConsumerTag(const QString &consumerTag);
QString consumerTag() const;