diff options
author | Alan Conway <aconway@apache.org> | 2006-12-19 17:55:16 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-12-19 17:55:16 +0000 |
commit | 19e767250f689cac7ab950f68e6421a4490f76f6 (patch) | |
tree | 81df6cd819e1f0fa23c71f4761978445c4353904 /cpp/lib/client | |
parent | 7edf1cc45ee35542df2ba4e3ebd2bc4d9e9dd9b9 (diff) | |
download | qpid-python-19e767250f689cac7ab950f68e6421a4490f76f6.tar.gz |
* cpp/gen/Makefile.am: fixed generated code dependencies.
* *Channel,SessionHandlerImpl,FramingTest: added FieldTable argument
to consume() to conform to updated XML.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@488745 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/client')
-rw-r--r-- | cpp/lib/client/ClientChannel.cpp | 14 | ||||
-rw-r--r-- | cpp/lib/client/ClientChannel.h | 7 |
2 files changed, 15 insertions, 6 deletions
diff --git a/cpp/lib/client/ClientChannel.cpp b/cpp/lib/client/ClientChannel.cpp index ba21199732..c7b8e39ae5 100644 --- a/cpp/lib/client/ClientChannel.cpp +++ b/cpp/lib/client/ClientChannel.cpp @@ -124,11 +124,17 @@ void Channel::bind(const Exchange& exchange, const Queue& queue, const std::stri } } -void Channel::consume(Queue& queue, std::string& tag, MessageListener* listener, - int ackMode, bool noLocal, bool synch){ - +void Channel::consume( + Queue& queue, std::string& tag, MessageListener* listener, + int ackMode, bool noLocal, bool synch, const FieldTable* fields) +{ string q = queue.getName(); - AMQFrame* frame = new AMQFrame(id, new BasicConsumeBody(version, 0, q, (string&) tag, noLocal, ackMode == NO_ACK, false, !synch)); + AMQFrame* frame = + new AMQFrame( + id, + new BasicConsumeBody( + version, 0, q, tag, noLocal, ackMode == NO_ACK, false, !synch, + fields ? *fields : FieldTable())); if(synch){ sendAndReceive(frame, method_bodies.basic_consume_ok); BasicConsumeOkBody::shared_ptr response = dynamic_pointer_cast<BasicConsumeOkBody, AMQMethodBody>(responses.getResponse()); diff --git a/cpp/lib/client/ClientChannel.h b/cpp/lib/client/ClientChannel.h index e617da05c0..27509a10d9 100644 --- a/cpp/lib/client/ClientChannel.h +++ b/cpp/lib/client/ClientChannel.h @@ -213,8 +213,11 @@ namespace client { * @param synch if true this call will block until a response * is received from the broker */ - void consume(Queue& queue, std::string& tag, MessageListener* listener, - int ackMode = NO_ACK, bool noLocal = false, bool synch = true); + void consume( + Queue& queue, std::string& tag, MessageListener* listener, + int ackMode = NO_ACK, bool noLocal = false, bool synch = true, + const qpid::framing::FieldTable* fields = 0); + /** * Cancels a subscription previously set up through a call to consume(). * |