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 | 5285b7f61ea48a53c1997f3910b687be582f3537 (patch) | |
| tree | eb49c9029b408a4787ca014b8423e52de0e864d6 /qpid/cpp/lib/client | |
| parent | 83dfcd846205e21f90639d23078b718bfbbe2dc4 (diff) | |
| download | qpid-python-5285b7f61ea48a53c1997f3910b687be582f3537.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@488745 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/client')
| -rw-r--r-- | qpid/cpp/lib/client/ClientChannel.cpp | 14 | ||||
| -rw-r--r-- | qpid/cpp/lib/client/ClientChannel.h | 7 |
2 files changed, 15 insertions, 6 deletions
diff --git a/qpid/cpp/lib/client/ClientChannel.cpp b/qpid/cpp/lib/client/ClientChannel.cpp index ba21199732..c7b8e39ae5 100644 --- a/qpid/cpp/lib/client/ClientChannel.cpp +++ b/qpid/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/qpid/cpp/lib/client/ClientChannel.h b/qpid/cpp/lib/client/ClientChannel.h index e617da05c0..27509a10d9 100644 --- a/qpid/cpp/lib/client/ClientChannel.h +++ b/qpid/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(). * |
