summaryrefslogtreecommitdiff
path: root/cpp/lib/client/ResponseHandler.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-02-02 22:03:10 +0000
committerAlan Conway <aconway@apache.org>2007-02-02 22:03:10 +0000
commitb5c270f10496f522ef6a03a8fa60f85d55c9187d (patch)
tree714e7abf7ba591d00232d821440e51461175cb9e /cpp/lib/client/ResponseHandler.h
parent750f272ac99e8c830807affb3ae68ab0beeca63f (diff)
downloadqpid-python-b5c270f10496f522ef6a03a8fa60f85d55c9187d.tar.gz
* cpp/lib/common/framing/MethodContext.h: Reduced MethodContext to
ChannelAdapter and Method Body. Request ID comes from body, ChannelAdapter is used to send frames, not OutputHandler. * cpp/lib/common/framing/ChannelAdapter.h,.cpp: Removed context member. Context is per-method not per-channel. * cpp/lib/broker/*: Replace direct use of OutputHandler and ChannelId with MethodContext (for responses) or ChannelAdapter (for requests.) Use context request-ID to construct responses, send all bodies via ChannelAdapter. * cpp/lib/broker/BrokerAdapter.cpp: Link broker::Channel to BrokerAdapter. * cpp/lib/broker/*: Remove unnecessary ProtocolVersion parameters. Fix bogus signatures: ProtocolVersion* -> const ProtocolVersion& * Cosmetic changes, many files: - fixed indentation, broke long lines. - removed unnecessary qpid:: prefixes. * broker/BrokerAdapter,BrokerChannel: Merged BrokerAdapter into broker::channel. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@502767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/client/ResponseHandler.h')
-rw-r--r--cpp/lib/client/ResponseHandler.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/lib/client/ResponseHandler.h b/cpp/lib/client/ResponseHandler.h
index c402bcbc65..af0c250eb1 100644
--- a/cpp/lib/client/ResponseHandler.h
+++ b/cpp/lib/client/ResponseHandler.h
@@ -20,8 +20,7 @@
*/
#include <string>
-#include <amqp_types.h>
-#include <framing/amqp_framing.h>
+#include <framing/amqp_framing.h> // FIXME aconway 2007-02-01: #include cleanup.
#include <sys/Monitor.h>
#ifndef _ResponseHandler_
@@ -52,11 +51,13 @@ class ResponseHandler{
bool validate(framing::ClassId, framing::MethodId);
void receive(framing::ClassId, framing::MethodId);
+ framing::RequestId getRequestId();
+
template <class BodyType> bool validate() {
return validate(BodyType::CLASS_ID, BodyType::METHOD_ID);
}
template <class BodyType> void receive() {
- return receive(BodyType::CLASS_ID, BodyType::METHOD_ID);
+ receive(BodyType::CLASS_ID, BodyType::METHOD_ID);
}
};