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; d->name = name;
} }
bool QAmqpChannel::isOpened() const bool QAmqpChannel::isOpen() const
{ {
Q_D(const QAmqpChannel); Q_D(const QAmqpChannel);
return d->opened; return d->opened;

View File

@ -10,13 +10,13 @@ class QAMQP_EXPORT QAmqpChannel : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(int number READ channelNumber CONSTANT) 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) Q_PROPERTY(QString name READ name WRITE setName)
public: public:
virtual ~QAmqpChannel(); virtual ~QAmqpChannel();
int channelNumber() const; int channelNumber() const;
bool isOpened() const; bool isOpen() const;
QString name() const; QString name() const;
void setName(const QString &name); void setName(const QString &name);

View File

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

View File

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

View File

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

View File

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