diff options
| author | Alan Conway <aconway@apache.org> | 2007-09-18 16:05:48 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-09-18 16:05:48 +0000 |
| commit | e0bf5acc51a983b2cb5c3d959b513d21a2cb57c1 (patch) | |
| tree | 102c70e2e96cf745f4592f78f178fc2152a0eb78 /cpp/src/qpid/framing | |
| parent | 01e3826d26fd0efecd1663835143da15ebaa828d (diff) | |
| download | qpid-python-e0bf5acc51a983b2cb5c3d959b513d21a2cb57c1.tar.gz | |
* rubygen/templates/Proxy.rb, src/qpid/framing/Proxy.cpp, Proxy.h:
Drop ChannelAdapter, construct Proxy from FrameHandler.
* src/qpid/framing/amqp_types.h: Added missing decl for class Uuid.
* src/qpid/broker/HandlerImpl.h, src/qpid/broker/ConnectionAdapter.cpp: Fix Proxy constructor calls
* src/qpid/framing/AMQFrame.h (class AMQFrame): construct from AMQBody only.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@576963 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing')
| -rw-r--r-- | cpp/src/qpid/framing/AMQFrame.h | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/Proxy.cpp | 13 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/Proxy.h | 16 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/amqp_types.h | 1 |
4 files changed, 21 insertions, 13 deletions
diff --git a/cpp/src/qpid/framing/AMQFrame.h b/cpp/src/qpid/framing/AMQFrame.h index f4aec72e4c..392b8c0c01 100644 --- a/cpp/src/qpid/framing/AMQFrame.h +++ b/cpp/src/qpid/framing/AMQFrame.h @@ -48,6 +48,10 @@ class AMQFrame : public AMQDataBlock setBody(b); } + AMQFrame(const AMQBody& b) : bof(true), eof(true), bos(true), eos(true), subchannel(0), channel(0) { + setBody(b); + } + ChannelId getChannel() const { return channel; } void setChannel(ChannelId c) { channel = c; } diff --git a/cpp/src/qpid/framing/Proxy.cpp b/cpp/src/qpid/framing/Proxy.cpp index 0b2a882a49..b47060028f 100644 --- a/cpp/src/qpid/framing/Proxy.cpp +++ b/cpp/src/qpid/framing/Proxy.cpp @@ -17,16 +17,21 @@ */ #include "Proxy.h" -#include "ChannelAdapter.h" -#include "ProtocolVersion.h" +#include "AMQFrame.h" namespace qpid { namespace framing { Proxy::~Proxy() {} -ProtocolVersion Proxy::getProtocolVersion() const { - return channel.getVersion(); +void Proxy::send(const AMQBody& b) { + AMQFrame f(b); + out.handle(f); +} + + +ProtocolVersion Proxy::getVersion() const { + return ProtocolVersion(); } }} // namespace qpid::framing diff --git a/cpp/src/qpid/framing/Proxy.h b/cpp/src/qpid/framing/Proxy.h index 279f219ddd..b6ac897e96 100644 --- a/cpp/src/qpid/framing/Proxy.h +++ b/cpp/src/qpid/framing/Proxy.h @@ -19,31 +19,29 @@ * */ +#include "FrameHandler.h" #include "ProtocolVersion.h" -#include "amqp_types.h" namespace qpid { namespace framing { -class ChannelAdapter; -class FieldTable; -class Content; -class Uuid; +class AMQBody; /** * Base class for proxies. */ class Proxy { - public: - Proxy(ChannelAdapter& ch) : channel(ch) {} + Proxy(FrameHandler& h) : out(h) {} virtual ~Proxy(); - ProtocolVersion getProtocolVersion() const; + void send(const AMQBody&); + + ProtocolVersion getVersion() const; protected: - ChannelAdapter& channel; + FrameHandler& out; }; }} // namespace qpid::framing diff --git a/cpp/src/qpid/framing/amqp_types.h b/cpp/src/qpid/framing/amqp_types.h index bfd5b2206f..b922d33dbc 100644 --- a/cpp/src/qpid/framing/amqp_types.h +++ b/cpp/src/qpid/framing/amqp_types.h @@ -53,6 +53,7 @@ typedef uint16_t ReplyCode; class Content; class FieldTable; class SequenceNumberSet; +class Uuid; // Useful constants |
