diff options
Diffstat (limited to 'cpp/lib/broker')
-rw-r--r-- | cpp/lib/broker/BrokerChannel.cpp | 2 | ||||
-rw-r--r-- | cpp/lib/broker/BrokerChannel.h | 3 | ||||
-rw-r--r-- | cpp/lib/broker/SessionHandlerImpl.cpp | 13 | ||||
-rw-r--r-- | cpp/lib/broker/SessionHandlerImpl.h | 24 |
4 files changed, 20 insertions, 22 deletions
diff --git a/cpp/lib/broker/BrokerChannel.cpp b/cpp/lib/broker/BrokerChannel.cpp index 8805b72774..5d4f68a8af 100644 --- a/cpp/lib/broker/BrokerChannel.cpp +++ b/cpp/lib/broker/BrokerChannel.cpp @@ -53,7 +53,7 @@ bool Channel::exists(const string& consumerTag){ return consumers.find(consumerTag) != consumers.end(); } -void Channel::consume(string& tag, Queue::shared_ptr queue, bool acks, bool exclusive, ConnectionToken* const connection){ +void Channel::consume(string& tag, Queue::shared_ptr queue, bool acks, bool exclusive, ConnectionToken* const connection, const FieldTable*){ if(tag.empty()) tag = tagGenerator.generate(); ConsumerImpl* c(new ConsumerImpl(this, tag, queue, connection, acks)); try{ diff --git a/cpp/lib/broker/BrokerChannel.h b/cpp/lib/broker/BrokerChannel.h index 50c8358e96..fa3912c78e 100644 --- a/cpp/lib/broker/BrokerChannel.h +++ b/cpp/lib/broker/BrokerChannel.h @@ -103,7 +103,8 @@ namespace qpid { inline u_int32_t setPrefetchSize(u_int32_t size){ return prefetchSize = size; } inline u_int16_t setPrefetchCount(u_int16_t count){ return prefetchCount = count; } bool exists(const string& consumerTag); - void consume(string& tag, Queue::shared_ptr queue, bool acks, bool exclusive, ConnectionToken* const connection = 0); + void consume(string& tag, Queue::shared_ptr queue, bool acks, bool exclusive, + ConnectionToken* const connection = 0, const qpid::framing::FieldTable* = 0); void cancel(const string& tag); bool get(Queue::shared_ptr queue, bool ackExpected); void begin(); diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp index ad203b4515..bd6ca9dee9 100644 --- a/cpp/lib/broker/SessionHandlerImpl.cpp +++ b/cpp/lib/broker/SessionHandlerImpl.cpp @@ -360,10 +360,12 @@ void SessionHandlerImpl::BasicHandlerImpl::qos(u_int16_t channel, u_int32_t pref parent->client->getBasic().qosOk(channel); } -void SessionHandlerImpl::BasicHandlerImpl::consume(u_int16_t channelId, u_int16_t /*ticket*/, - const string& queueName, const string& consumerTag, - bool noLocal, bool noAck, bool exclusive, - bool nowait){ +void SessionHandlerImpl::BasicHandlerImpl::consume( + u_int16_t channelId, u_int16_t /*ticket*/, + const string& queueName, const string& consumerTag, + bool noLocal, bool noAck, bool exclusive, + bool nowait, const FieldTable& fields) +{ Queue::shared_ptr queue = parent->getQueue(queueName, channelId); Channel* channel = parent->channels[channelId]; @@ -373,7 +375,8 @@ void SessionHandlerImpl::BasicHandlerImpl::consume(u_int16_t channelId, u_int16_ try{ string newTag = consumerTag; - channel->consume(newTag, queue, !noAck, exclusive, noLocal ? parent : 0); + channel->consume( + newTag, queue, !noAck, exclusive, noLocal ? parent : 0, &fields); if(!nowait) parent->client->getBasic().consumeOk(channelId, newTag); diff --git a/cpp/lib/broker/SessionHandlerImpl.h b/cpp/lib/broker/SessionHandlerImpl.h index 043ad8bf98..7e631b4505 100644 --- a/cpp/lib/broker/SessionHandlerImpl.h +++ b/cpp/lib/broker/SessionHandlerImpl.h @@ -61,7 +61,7 @@ struct ConnectionException : public std::exception { }; class Settings { -public: + public: const u_int32_t timeout;//timeout for auto-deleted queues (in ms) const u_int64_t stagingThreshold; @@ -125,7 +125,6 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, public: inline ConnectionHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {} - // Change to match new code generator function signature (adding const to string& and FieldTable&) - kpvdr 2006-11-20 virtual void startOk(u_int16_t channel, const qpid::framing::FieldTable& clientProperties, const string& mechanism, const string& response, const string& locale); @@ -172,7 +171,6 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, public: inline ExchangeHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {} - // Change to match new code generator function signature (adding const to string& and FieldTable&) - kpvdr 2006-11-20 virtual void declare(u_int16_t channel, u_int16_t ticket, const string& exchange, const string& type, bool passive, bool durable, bool autoDelete, bool internal, bool nowait, const qpid::framing::FieldTable& arguments); @@ -189,17 +187,14 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, public: inline QueueHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {} - // Change to match new code generator function signature (adding const to string& and FieldTable&) - kpvdr 2006-11-20 virtual void declare(u_int16_t channel, u_int16_t ticket, const string& queue, bool passive, bool durable, bool exclusive, bool autoDelete, bool nowait, const qpid::framing::FieldTable& arguments); - // Change to match new code generator function signature (adding const to string& and FieldTable&) - kpvdr 2006-11-20 virtual void bind(u_int16_t channel, u_int16_t ticket, const string& queue, const string& exchange, const string& routingKey, bool nowait, const qpid::framing::FieldTable& arguments); - - // Change to match new code generator function signature (adding const to string&) - kpvdr 2006-11-20 + virtual void purge(u_int16_t channel, u_int16_t ticket, const string& queue, bool nowait); @@ -216,19 +211,18 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, inline BasicHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {} virtual void qos(u_int16_t channel, u_int32_t prefetchSize, u_int16_t prefetchCount, bool global); - - // Change to match new code generator function signature (adding const to string&) - kpvdr 2006-11-20 - virtual void consume(u_int16_t channel, u_int16_t ticket, const string& queue, const string& consumerTag, - bool noLocal, bool noAck, bool exclusive, bool nowait); + + virtual void consume( + u_int16_t channel, u_int16_t ticket, const string& queue, + const string& consumerTag, bool noLocal, bool noAck, + bool exclusive, bool nowait, + const qpid::framing::FieldTable& fields); - // Change to match new code generator function signature (adding const to string&) - kpvdr 2006-11-20 virtual void cancel(u_int16_t channel, const string& consumerTag, bool nowait); - // Change to match new code generator function signature (adding const to string&) - kpvdr 2006-11-20 virtual void publish(u_int16_t channel, u_int16_t ticket, const string& exchange, const string& routingKey, bool mandatory, bool immediate); - // Change to match new code generator function signature (adding const to string&) - kpvdr 2006-11-20 virtual void get(u_int16_t channel, u_int16_t ticket, const string& queue, bool noAck); virtual void ack(u_int16_t channel, u_int64_t deliveryTag, bool multiple); @@ -242,7 +236,7 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, class TxHandlerImpl : public virtual TxHandler{ SessionHandlerImpl* parent; - public: + public: TxHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {} virtual ~TxHandlerImpl() {} virtual void select(u_int16_t channel); |