convert methods to actions where it makes sense
QAmqpExchange and QAmqpQueue both have a number of actions associated with them that should be defined as slots (especially for a potential future where they are exported as QML objects). This is a step in the direction of fully making these classes scriptable
This commit is contained in:
parent
d45f5b09d6
commit
3c2a039c08
|
|
@ -71,6 +71,17 @@ public:
|
|||
|
||||
bool isDeclared() const;
|
||||
|
||||
void enableConfirms(bool noWait = false);
|
||||
bool waitForConfirms(int msecs = 30000);
|
||||
|
||||
Q_SIGNALS:
|
||||
void declared();
|
||||
void removed();
|
||||
|
||||
void confirmsEnabled();
|
||||
void allMessagesDelivered();
|
||||
|
||||
public Q_SLOTS:
|
||||
// AMQP Exchange
|
||||
void declare(ExchangeType type = Direct,
|
||||
ExchangeOptions options = NoOptions,
|
||||
|
|
@ -92,16 +103,6 @@ public:
|
|||
const QAmqpMessage::PropertyHash &properties = QAmqpMessage::PropertyHash(),
|
||||
int publishOptions = poNoOptions);
|
||||
|
||||
void enableConfirms(bool noWait = false);
|
||||
bool waitForConfirms(int msecs = 30000);
|
||||
|
||||
Q_SIGNALS:
|
||||
void declared();
|
||||
void removed();
|
||||
|
||||
void confirmsEnabled();
|
||||
void allMessagesDelivered();
|
||||
|
||||
protected:
|
||||
virtual void channelOpened();
|
||||
virtual void channelClosed();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ QAmqpMessagePrivate::QAmqpMessagePrivate()
|
|||
: deliveryTag(0),
|
||||
leftSize(0)
|
||||
{
|
||||
qRegisterMetaType<QAmqpMessage::PropertyHash>("QAmqpMessage::PropertyHash");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -74,6 +74,19 @@ public:
|
|||
void setConsumerTag(const QString &consumerTag);
|
||||
QString consumerTag() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void declared();
|
||||
void bound();
|
||||
void unbound();
|
||||
void removed();
|
||||
void purged(int messageCount);
|
||||
|
||||
void messageReceived();
|
||||
void empty();
|
||||
void consuming(const QString &consumerTag);
|
||||
void cancelled(const QString &consumerTag);
|
||||
|
||||
public Q_SLOTS:
|
||||
// AMQP Queue
|
||||
void declare(int options = Durable|AutoDelete);
|
||||
void bind(const QString &exchangeName, const QString &key);
|
||||
|
|
@ -92,18 +105,6 @@ public:
|
|||
void reject(const QAmqpMessage &message, bool requeue);
|
||||
void reject(qlonglong deliveryTag, bool requeue);
|
||||
|
||||
Q_SIGNALS:
|
||||
void declared();
|
||||
void bound();
|
||||
void unbound();
|
||||
void removed();
|
||||
void purged(int messageCount);
|
||||
|
||||
void messageReceived();
|
||||
void empty();
|
||||
void consuming(const QString &consumerTag);
|
||||
void cancelled(const QString &consumerTag);
|
||||
|
||||
protected:
|
||||
// reimp Channel
|
||||
virtual void channelOpened();
|
||||
|
|
|
|||
Loading…
Reference in New Issue