organize which methods are related to which parts of the spec, try to figure

out what we're missing
This commit is contained in:
Matt Broadstone 2014-06-05 14:10:29 -04:00
parent 6f05bf5ef9
commit 73a1d1db36
2 changed files with 19 additions and 17 deletions

View File

@ -538,8 +538,9 @@ Exchange *Client::createExchange(const QString &name, int channelNumber)
Exchange *exchange = new Exchange(channelNumber, this);
d->methodHandlersByChannel[exchange->channelNumber()].append(exchange->d_func());
connect(this, SIGNAL(connected()), exchange, SLOT(_q_open()));
exchange->d_func()->open();
connect(this, SIGNAL(disconnected()), exchange, SLOT(_q_disconnected()));
exchange->d_func()->open();
if (!name.isEmpty())
exchange->setName(name);
return exchange;
@ -558,8 +559,8 @@ Queue *Client::createQueue(const QString &name, int channelNumber)
d->contentHandlerByChannel[queue->channelNumber()].append(queue->d_func());
d->bodyHandlersByChannel[queue->channelNumber()].append(queue->d_func());
connect(this, SIGNAL(connected()), queue, SLOT(_q_open()));
queue->d_func()->open();
connect(this, SIGNAL(disconnected()), queue, SLOT(_q_disconnected()));
queue->d_func()->open();
if (!name.isEmpty())
queue->setName(name);

View File

@ -42,29 +42,30 @@ public:
~Queue();
QueueOptions option() const;
void declare(const QString &name = QString(),
QueueOptions options = QueueOptions(Durable | AutoDelete));
void remove(bool ifUnused = true, bool ifEmpty = true, bool noWait = true);
void purge();
void bind(const QString &exchangeName, const QString &key);
void bind(Exchange *exchange, const QString &key);
void unbind(const QString &exchangeName, const QString &key);
void unbind(Exchange *exchange, const QString &key);
bool hasMessage() const;
MessagePtr getMessage();
void get();
void ack(const MessagePtr &message);
bool hasMessage() const;
void consume(ConsumeOptions options = ConsumeOptions(NoOptions));
void setConsumerTag(const QString &consumerTag);
QString consumerTag() const;
void setNoAck(bool noAck);
bool noAck() const;
// AMQP Queue
void declare(const QString &name = QString(),
QueueOptions options = QueueOptions(Durable | AutoDelete));
void bind(const QString &exchangeName, const QString &key);
void bind(Exchange *exchange, const QString &key);
void unbind(const QString &exchangeName, const QString &key);
void unbind(Exchange *exchange, const QString &key);
void purge();
void remove(bool ifUnused = true, bool ifEmpty = true, bool noWait = true);
// AMQP Basic
void consume(ConsumeOptions options = ConsumeOptions(NoOptions));
void get();
void ack(const MessagePtr &message);
Q_SIGNALS:
void declared();
void bound();