commit
61ddeb0ad5
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include "qamqpframe_p.h"
|
#include "qamqpframe_p.h"
|
||||||
|
#include "qamqptable.h"
|
||||||
|
|
||||||
#define METHOD_ID_ENUM(name, id) name = id, name ## Ok
|
#define METHOD_ID_ENUM(name, id) name = id, name ## Ok
|
||||||
|
|
||||||
|
|
@ -77,6 +78,7 @@ public:
|
||||||
|
|
||||||
Q_DECLARE_PUBLIC(QAmqpChannel)
|
Q_DECLARE_PUBLIC(QAmqpChannel)
|
||||||
QAmqpChannel * const q_ptr;
|
QAmqpChannel * const q_ptr;
|
||||||
|
QAmqpTable arguments;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QAMQPCHANNEL_P_H
|
#endif // QAMQPCHANNEL_P_H
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public:
|
||||||
|
|
||||||
QString type;
|
QString type;
|
||||||
QAmqpExchange::ExchangeOptions options;
|
QAmqpExchange::ExchangeOptions options;
|
||||||
QAmqpTable arguments;
|
|
||||||
bool delayedDeclare;
|
bool delayedDeclare;
|
||||||
bool declared;
|
bool declared;
|
||||||
qlonglong nextDeliveryTag;
|
qlonglong nextDeliveryTag;
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ void QAmqpQueuePrivate::declare()
|
||||||
out << qint16(0); //reserved 1
|
out << qint16(0); //reserved 1
|
||||||
QAmqpFrame::writeAmqpField(out, QAmqpMetaType::ShortString, name);
|
QAmqpFrame::writeAmqpField(out, QAmqpMetaType::ShortString, name);
|
||||||
out << qint8(options);
|
out << qint8(options);
|
||||||
QAmqpFrame::writeAmqpField(out, QAmqpMetaType::Hash, QAmqpTable());
|
QAmqpFrame::writeAmqpField(out, QAmqpMetaType::Hash, arguments);
|
||||||
|
|
||||||
frame.setArguments(arguments);
|
frame.setArguments(arguments);
|
||||||
sendFrame(frame);
|
sendFrame(frame);
|
||||||
|
|
@ -328,10 +328,11 @@ int QAmqpQueue::options() const
|
||||||
return d->options;
|
return d->options;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QAmqpQueue::declare(int options)
|
void QAmqpQueue::declare(int options, const QAmqpTable &arguments)
|
||||||
{
|
{
|
||||||
Q_D(QAmqpQueue);
|
Q_D(QAmqpQueue);
|
||||||
d->options = options;
|
d->options = options;
|
||||||
|
d->arguments = arguments;
|
||||||
|
|
||||||
if (!d->opened) {
|
if (!d->opened) {
|
||||||
d->delayedDeclare = true;
|
d->delayedDeclare = true;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#include "qamqpchannel.h"
|
#include "qamqpchannel.h"
|
||||||
#include "qamqpmessage.h"
|
#include "qamqpmessage.h"
|
||||||
#include "qamqpglobal.h"
|
#include "qamqpglobal.h"
|
||||||
|
#include "qamqptable.h"
|
||||||
|
|
||||||
class QAmqpClient;
|
class QAmqpClient;
|
||||||
class QAmqpClientPrivate;
|
class QAmqpClientPrivate;
|
||||||
|
|
@ -88,7 +89,7 @@ Q_SIGNALS:
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
// AMQP Queue
|
// AMQP Queue
|
||||||
void declare(int options = Durable|AutoDelete);
|
void declare(int options = Durable|AutoDelete, const QAmqpTable &arguments = QAmqpTable());
|
||||||
void bind(const QString &exchangeName, const QString &key);
|
void bind(const QString &exchangeName, const QString &key);
|
||||||
void bind(QAmqpExchange *exchange, const QString &key);
|
void bind(QAmqpExchange *exchange, const QString &key);
|
||||||
void unbind(const QString &exchangeName, const QString &key);
|
void unbind(const QString &exchangeName, const QString &key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue