diff options
Diffstat (limited to 'cpp/src')
23 files changed, 36 insertions, 169 deletions
diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am index 690f939e71..23a9e2a2fa 100644 --- a/cpp/src/Makefile.am +++ b/cpp/src/Makefile.am @@ -369,8 +369,6 @@ nobase_include_HEADERS = \ qpid/framing/HeaderProperties.h \ qpid/framing/InitiationHandler.h \ qpid/framing/InputHandler.h \ - qpid/framing/MethodContent.h \ - qpid/framing/MethodContext.h \ qpid/framing/OutputHandler.h \ qpid/framing/ProtocolInitiation.h \ qpid/framing/ProtocolVersion.h \ diff --git a/cpp/src/qpid/broker/BrokerAdapter.cpp b/cpp/src/qpid/broker/BrokerAdapter.cpp index 26c2b30ac6..77030855ff 100644 --- a/cpp/src/qpid/broker/BrokerAdapter.cpp +++ b/cpp/src/qpid/broker/BrokerAdapter.cpp @@ -400,18 +400,5 @@ void BrokerAdapter::ChannelHandlerImpl::ok() //no specific action required, generic response handling should be sufficient } -void BrokerAdapter::setResponseTo(RequestId r) -{ - basicHandler.client.setResponseTo(r); - channelHandler.client.setResponseTo(r); - exchangeHandler.client.setResponseTo(r); - bindingHandler.client.setResponseTo(r); - messageHandler.client.setResponseTo(r); - queueHandler.client.setResponseTo(r); - txHandler.client.setResponseTo(r); - dtxHandler.setResponseTo(r); -} - - }} // namespace qpid::broker diff --git a/cpp/src/qpid/broker/BrokerAdapter.h b/cpp/src/qpid/broker/BrokerAdapter.h index 4ae8346580..3fe2eb9eba 100644 --- a/cpp/src/qpid/broker/BrokerAdapter.h +++ b/cpp/src/qpid/broker/BrokerAdapter.h @@ -85,7 +85,6 @@ class BrokerAdapter : public CoreRefs, public framing::AMQP_ServerOperations } framing::AMQP_ClientProxy& getProxy() { return proxy; } - void setResponseTo(framing::RequestId r); private: diff --git a/cpp/src/qpid/broker/BrokerMessage.h b/cpp/src/qpid/broker/BrokerMessage.h index 3f22f07aec..af8e4e62e9 100644 --- a/cpp/src/qpid/broker/BrokerMessage.h +++ b/cpp/src/qpid/broker/BrokerMessage.h @@ -35,7 +35,6 @@ namespace qpid { namespace framing { -class MethodContext; class ChannelAdapter; class AMQHeaderBody; } diff --git a/cpp/src/qpid/broker/BrokerMessageBase.h b/cpp/src/qpid/broker/BrokerMessageBase.h index aeb34880eb..94035905ce 100644 --- a/cpp/src/qpid/broker/BrokerMessageBase.h +++ b/cpp/src/qpid/broker/BrokerMessageBase.h @@ -33,7 +33,6 @@ namespace qpid { namespace framing { -class MethodContext; class ChannelAdapter; class BasicHeaderProperties; class FieldTable; diff --git a/cpp/src/qpid/broker/BrokerMessageMessage.cpp b/cpp/src/qpid/broker/BrokerMessageMessage.cpp index 9ad27093bb..0da5f3d8f5 100644 --- a/cpp/src/qpid/broker/BrokerMessageMessage.cpp +++ b/cpp/src/qpid/broker/BrokerMessageMessage.cpp @@ -48,27 +48,24 @@ struct MessageDeliveryToken : public DeliveryToken }; MessageMessage::MessageMessage( - ConnectionToken* publisher, RequestId requestId_, TransferPtr transfer_ + ConnectionToken* publisher, TransferPtr transfer_ ) : Message(publisher, transfer_->getDestination(), transfer_->getRoutingKey(), transfer_->getRejectUnroutable(), transfer_->getImmediate(), transfer_), - requestId(requestId_), transfer(transfer_) { assert(transfer->getBody().isInline()); } MessageMessage::MessageMessage( - ConnectionToken* publisher, RequestId requestId_, TransferPtr transfer_, - ReferencePtr reference_ + ConnectionToken* publisher, TransferPtr transfer_, ReferencePtr reference_ ) : Message(publisher, transfer_->getDestination(), transfer_->getRoutingKey(), transfer_->getRejectUnroutable(), transfer_->getImmediate(), transfer_), - requestId(requestId_), transfer(transfer_), reference(reference_) { @@ -178,7 +175,7 @@ void MessageMessage::transferMessage( ReferencePtr newRef(new Reference(refname)); Reference::AppendPtr newAppend(new MessageAppendBody(channel.getVersion(), refname, content)); newRef->append(newAppend); - MessageMessage newMsg(const_cast<ConnectionToken*>(getPublisher()), 0, newTransfer, newRef); + MessageMessage newMsg(const_cast<ConnectionToken*>(getPublisher()), newTransfer, newRef); newMsg.transferMessage(channel, consumerTag, framesize); return; } diff --git a/cpp/src/qpid/broker/BrokerMessageMessage.h b/cpp/src/qpid/broker/BrokerMessageMessage.h index 4efd22c9fe..6b1bd9ab5d 100644 --- a/cpp/src/qpid/broker/BrokerMessageMessage.h +++ b/cpp/src/qpid/broker/BrokerMessageMessage.h @@ -43,13 +43,12 @@ class MessageMessage: public Message{ typedef boost::shared_ptr<framing::MessageTransferBody> TransferPtr; typedef boost::shared_ptr<Reference> ReferencePtr; - MessageMessage(ConnectionToken* publisher, framing::RequestId, TransferPtr transfer); - MessageMessage(ConnectionToken* publisher, framing::RequestId, TransferPtr transfer, ReferencePtr reference); + MessageMessage(ConnectionToken* publisher, TransferPtr transfer); + MessageMessage(ConnectionToken* publisher, TransferPtr transfer, ReferencePtr reference); MessageMessage(); // Default destructor okay - framing::RequestId getRequestId() const {return requestId; } TransferPtr getTransfer() const { return transfer; } ReferencePtr getReference() const ; @@ -86,7 +85,6 @@ class MessageMessage: public Message{ const std::string& destination, const framing::Content& body) const; - framing::RequestId requestId; const TransferPtr transfer; const boost::shared_ptr<Reference> reference; }; diff --git a/cpp/src/qpid/broker/ConnectionAdapter.cpp b/cpp/src/qpid/broker/ConnectionAdapter.cpp index 4fa4b2c238..a67a5557c6 100644 --- a/cpp/src/qpid/broker/ConnectionAdapter.cpp +++ b/cpp/src/qpid/broker/ConnectionAdapter.cpp @@ -21,14 +21,12 @@ #include "ConnectionAdapter.h" #include "Connection.h" -#include "qpid/framing/MethodContext.h" using namespace qpid; using namespace qpid::broker; using qpid::framing::ReplyCode; using qpid::framing::ClassId; using qpid::framing::MethodId; -using qpid::framing::MethodContext; using qpid::framing::FieldTable; void ConnectionAdapter::init(const framing::ProtocolInitiation& header) { @@ -44,13 +42,11 @@ void ConnectionAdapter::close(ReplyCode code, const string& text, ClassId classI handler->client.close(code, text, classId, methodId); } -void ConnectionAdapter::handleMethodInContext( - boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const MethodContext& context -) +void ConnectionAdapter::handleMethod( + boost::shared_ptr<qpid::framing::AMQMethodBody> method) { try{ - method->invoke(*this, context); + method->invoke(*this); }catch(ConnectionException& e){ handler->client.close(e.code, e.toString(), method->amqpClassId(), method->amqpMethodId()); }catch(std::exception& e){ diff --git a/cpp/src/qpid/broker/ConnectionAdapter.h b/cpp/src/qpid/broker/ConnectionAdapter.h index 6890b014a4..1ce850a659 100644 --- a/cpp/src/qpid/broker/ConnectionAdapter.h +++ b/cpp/src/qpid/broker/ConnectionAdapter.h @@ -47,8 +47,7 @@ public: void handle(framing::AMQFrame& frame); //ChannelAdapter virtual methods: - void handleMethodInContext(boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context); + void handleMethod(boost::shared_ptr<qpid::framing::AMQMethodBody> method); bool isOpen() const { return true; } //channel 0 is always open //never needed: void handleHeader(boost::shared_ptr<qpid::framing::AMQHeaderBody>) {} diff --git a/cpp/src/qpid/broker/DtxHandlerImpl.cpp b/cpp/src/qpid/broker/DtxHandlerImpl.cpp index 72d3888e37..8b3629dff9 100644 --- a/cpp/src/qpid/broker/DtxHandlerImpl.cpp +++ b/cpp/src/qpid/broker/DtxHandlerImpl.cpp @@ -25,7 +25,6 @@ using namespace qpid::broker; using qpid::framing::AMQP_ClientProxy; using qpid::framing::Buffer; using qpid::framing::FieldTable; -using qpid::framing::MethodContext; using std::string; DtxHandlerImpl::DtxHandlerImpl(CoreRefs& parent) : @@ -194,9 +193,4 @@ void DtxHandlerImpl::setTimeout(u_int16_t /*ticket*/, broker.getDtxManager().setTimeout(xid, timeout); } -void DtxHandlerImpl::setResponseTo(framing::RequestId r) -{ - dClient.setResponseTo(r); - cClient.setResponseTo(r); -} diff --git a/cpp/src/qpid/broker/DtxHandlerImpl.h b/cpp/src/qpid/broker/DtxHandlerImpl.h index 6139b95bd6..067ba47fb5 100644 --- a/cpp/src/qpid/broker/DtxHandlerImpl.h +++ b/cpp/src/qpid/broker/DtxHandlerImpl.h @@ -36,8 +36,6 @@ class DtxHandlerImpl public: DtxHandlerImpl(CoreRefs& parent); - void setResponseTo(framing::RequestId r); - // DtxCoordinationHandler: void commit(u_int16_t ticket, const std::string& xid, bool onePhase); diff --git a/cpp/src/qpid/broker/MessageHandlerImpl.cpp b/cpp/src/qpid/broker/MessageHandlerImpl.cpp index 70f7c3b8ec..b5bea05eac 100644 --- a/cpp/src/qpid/broker/MessageHandlerImpl.cpp +++ b/cpp/src/qpid/broker/MessageHandlerImpl.cpp @@ -54,7 +54,7 @@ MessageHandlerImpl::open(const string& /*reference*/) } void -MessageHandlerImpl::append(const framing::MethodContext& /*context*/) +MessageHandlerImpl::append(const framing::AMQMethodBody& ) { throw ConnectionException(540, "References no longer supported"); } @@ -157,14 +157,13 @@ MessageHandlerImpl::reject(uint16_t /*code*/, const string& /*text*/ ) } void -MessageHandlerImpl::transfer(const framing::MethodContext& context) +MessageHandlerImpl::transfer(const framing::AMQMethodBody& context) { MessageTransferBody::shared_ptr transfer( - boost::shared_polymorphic_downcast<MessageTransferBody>( - context.methodBody)); + make_shared_ptr(new MessageTransferBody(static_cast<const MessageTransferBody&>(context)))); if (transfer->getBody().isInline()) { - MessageMessage::shared_ptr message(new MessageMessage(&connection, 0, transfer)); + MessageMessage::shared_ptr message(new MessageMessage(&connection, transfer)); channel.handleInlineTransfer(message); } else { throw ConnectionException(540, "References no longer supported"); diff --git a/cpp/src/qpid/broker/MessageHandlerImpl.h b/cpp/src/qpid/broker/MessageHandlerImpl.h index b7e91795ec..20cae46da4 100644 --- a/cpp/src/qpid/broker/MessageHandlerImpl.h +++ b/cpp/src/qpid/broker/MessageHandlerImpl.h @@ -40,7 +40,7 @@ class MessageHandlerImpl : public: MessageHandlerImpl(CoreRefs& parent); - void append(const framing::MethodContext& context); + void append(const framing::AMQMethodBody& context); void cancel(const std::string& destination ); @@ -82,7 +82,7 @@ class MessageHandlerImpl : void resume(const std::string& reference, const std::string& identifier ); - void transfer(const framing::MethodContext& context); + void transfer(const framing::AMQMethodBody& context); void flow(const std::string& destination, u_int8_t unit, u_int32_t value); diff --git a/cpp/src/qpid/broker/SemanticHandler.cpp b/cpp/src/qpid/broker/SemanticHandler.cpp index fd0a5cfbe1..6ef2162a4a 100644 --- a/cpp/src/qpid/broker/SemanticHandler.cpp +++ b/cpp/src/qpid/broker/SemanticHandler.cpp @@ -60,13 +60,12 @@ void SemanticHandler::handle(framing::AMQFrame& frame) } //ChannelAdapter virtual methods: -void SemanticHandler::handleMethodInContext(boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context) +void SemanticHandler::handleMethod(boost::shared_ptr<qpid::framing::AMQMethodBody> method) { try { if (!method->invoke(this)) { //else do the usual: - handleL4(method, context); + handleL4(method); //(if the frameset is complete) we can move the execution-mark //forward @@ -113,8 +112,7 @@ void SemanticHandler::flush() } } -void SemanticHandler::handleL4(boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context) +void SemanticHandler::handleL4(boost::shared_ptr<qpid::framing::AMQMethodBody> method) { try{ if(getId() != 0 && !method->isA<ChannelOpenBody>() && !isOpen()) { @@ -124,7 +122,7 @@ void SemanticHandler::handleL4(boost::shared_ptr<qpid::framing::AMQMethodBody> m throw ConnectionException(504, out.str()); } } else { - method->invoke(*adapter, context); + method->invoke(*adapter); } }catch(const ChannelException& e){ adapter->getProxy().getChannel().close( @@ -171,7 +169,7 @@ void SemanticHandler::redeliver(Message::shared_ptr& msg, DeliveryToken::shared_ msg->deliver(*this, tag, token, connection.getFrameMax()); } -RequestId SemanticHandler::send(shared_ptr<AMQBody> body) +void SemanticHandler::send(shared_ptr<AMQBody> body) { Mutex::ScopedLock l(outLock); uint8_t type(body->type()); @@ -182,5 +180,5 @@ RequestId SemanticHandler::send(shared_ptr<AMQBody> body) //std::cout << "[" << this << "] allocated: " << outgoing.hwm.getValue() << " to " << *body << std::endl; } } - return ChannelAdapter::send(body); + ChannelAdapter::send(body); } diff --git a/cpp/src/qpid/broker/SemanticHandler.h b/cpp/src/qpid/broker/SemanticHandler.h index 7d5d95243e..016c94738d 100644 --- a/cpp/src/qpid/broker/SemanticHandler.h +++ b/cpp/src/qpid/broker/SemanticHandler.h @@ -48,18 +48,16 @@ class SemanticHandler : private framing::ChannelAdapter, framing::Window outgoing; sys::Mutex outLock; - void handleL4(boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context); + void handleL4(boost::shared_ptr<qpid::framing::AMQMethodBody> method); //ChannelAdapter virtual methods: - void handleMethodInContext(boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context); + void handleMethod(boost::shared_ptr<qpid::framing::AMQMethodBody> method); bool isOpen() const; void handleHeader(boost::shared_ptr<qpid::framing::AMQHeaderBody>); void handleContent(boost::shared_ptr<qpid::framing::AMQContentBody>); void handleHeartbeat(boost::shared_ptr<qpid::framing::AMQHeartbeatBody>); - framing::RequestId send(shared_ptr<framing::AMQBody> body); + void send(shared_ptr<framing::AMQBody> body); //delivery adapter methods: diff --git a/cpp/src/qpid/cluster/SessionManager.cpp b/cpp/src/qpid/cluster/SessionManager.cpp index 715ed7817c..a4efa939fc 100644 --- a/cpp/src/qpid/cluster/SessionManager.cpp +++ b/cpp/src/qpid/cluster/SessionManager.cpp @@ -57,7 +57,7 @@ using namespace broker; void handle(AMQFrame& frame) { AMQMethodBody* body=dynamic_cast<AMQMethodBody*>(frame.body.get()); assert(body); - body->invoke(adapter, MethodContext()); // TODO aconway 2007-07-24: Remove MethodContext + body->invoke(adapter); } // Dummy methods. @@ -65,9 +65,9 @@ using namespace broker; virtual void handleContent(boost::shared_ptr<AMQContentBody>){} virtual void handleHeartbeat(boost::shared_ptr<AMQHeartbeatBody>){} virtual bool isOpen() const{ return true; } - virtual void handleMethodInContext(shared_ptr<AMQMethodBody>, const MethodContext&){} + virtual void handleMethod(shared_ptr<AMQMethodBody>){} // No-op send. - virtual RequestId send(shared_ptr<AMQBody>) { return 0; } + virtual void send(shared_ptr<AMQBody>) {} //delivery adapter methods, also no-ops: virtual DeliveryId deliver(Message::shared_ptr&, DeliveryToken::shared_ptr) { return 0; } diff --git a/cpp/src/qpid/framing/AMQMethodBody.cpp b/cpp/src/qpid/framing/AMQMethodBody.cpp index eb34d48c5f..0a2720e69a 100644 --- a/cpp/src/qpid/framing/AMQMethodBody.cpp +++ b/cpp/src/qpid/framing/AMQMethodBody.cpp @@ -31,7 +31,7 @@ void AMQMethodBody::encodeId(Buffer& buffer) const{ buffer.putShort(amqpMethodId()); } -void AMQMethodBody::invoke(AMQP_ServerOperations&, const MethodContext&){ +void AMQMethodBody::invoke(AMQP_ServerOperations&){ assert(0); THROW_QPID_ERROR(PROTOCOL_ERROR, "Method not supported by AMQP Server."); } diff --git a/cpp/src/qpid/framing/AMQMethodBody.h b/cpp/src/qpid/framing/AMQMethodBody.h index cbfd438b48..73c5eb78a6 100644 --- a/cpp/src/qpid/framing/AMQMethodBody.h +++ b/cpp/src/qpid/framing/AMQMethodBody.h @@ -26,7 +26,6 @@ #include "AMQBody.h" #include "Buffer.h" #include "qpid/framing/AMQP_ServerOperations.h" -#include "MethodContext.h" namespace qpid { namespace framing { @@ -52,7 +51,7 @@ class AMQMethodBody : public AMQBody virtual MethodId amqpMethodId() const = 0; virtual ClassId amqpClassId() const = 0; - virtual void invoke(AMQP_ServerOperations&, const MethodContext&); + virtual void invoke(AMQP_ServerOperations&); virtual bool invoke(Invocable* target); template <class T> bool isA() { diff --git a/cpp/src/qpid/framing/ChannelAdapter.cpp b/cpp/src/qpid/framing/ChannelAdapter.cpp index b3b442004a..d61126bc7f 100644 --- a/cpp/src/qpid/framing/ChannelAdapter.cpp +++ b/cpp/src/qpid/framing/ChannelAdapter.cpp @@ -18,6 +18,7 @@ #include <boost/format.hpp> #include "ChannelAdapter.h" +#include "OutputHandler.h" #include "AMQFrame.h" #include "FrameHandler.h" #include "qpid/Exception.h" @@ -44,18 +45,11 @@ void ChannelAdapter::init(ChannelId i, OutputHandler& out, ProtocolVersion v) handlers.out= make_shared_ptr(new OutputHandlerFrameHandler(out)); } -RequestId ChannelAdapter::send(shared_ptr<AMQBody> body) +void ChannelAdapter::send(shared_ptr<AMQBody> body) { - RequestId requestId = 0; assertChannelOpen(); AMQFrame frame(getVersion(), getId(), body); handlers.out->handle(frame); - return requestId; -} - -void ChannelAdapter::handleMethod(AMQMethodBody::shared_ptr method) { - assertMethodOk(*method); - handleMethodInContext(method, MethodContext(this, method)); } void ChannelAdapter::assertMethodOk(AMQMethodBody& method) const { diff --git a/cpp/src/qpid/framing/ChannelAdapter.h b/cpp/src/qpid/framing/ChannelAdapter.h index 84a626c864..9e418013eb 100644 --- a/cpp/src/qpid/framing/ChannelAdapter.h +++ b/cpp/src/qpid/framing/ChannelAdapter.h @@ -34,7 +34,6 @@ namespace qpid { namespace framing { -class MethodContext; class OutputHandler; /** @@ -67,12 +66,7 @@ class ChannelAdapter : protected BodyHandler { ChannelId getId() const { return id; } ProtocolVersion getVersion() const { return version; } - /** - * Send a frame. - *@param body Body of the frame. - *@return If body is a request, the ID assigned else 0. - */ - virtual RequestId send(shared_ptr<AMQBody> body); + virtual void send(shared_ptr<AMQBody> body); virtual bool isOpen() const = 0; @@ -81,16 +75,12 @@ class ChannelAdapter : protected BodyHandler { void assertChannelOpen() const; void assertChannelNotOpen() const; - virtual void handleMethodInContext( - shared_ptr<AMQMethodBody> method, - const MethodContext& context) = 0; + virtual void handleMethod(shared_ptr<AMQMethodBody>) = 0; private: class ChannelAdapterHandler; friend class ChannelAdapterHandler; - void handleMethod(shared_ptr<AMQMethodBody>); - ChannelId id; ProtocolVersion version; FrameHandler::Chains handlers; diff --git a/cpp/src/qpid/framing/MethodContext.h b/cpp/src/qpid/framing/MethodContext.h deleted file mode 100644 index 102dc279d4..0000000000 --- a/cpp/src/qpid/framing/MethodContext.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _framing_MethodContext_h -#define _framing_MethodContext_h - -/* - * - * Copyright (c) 2006 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include <boost/shared_ptr.hpp> - -#include "OutputHandler.h" -#include "ProtocolVersion.h" - -namespace qpid { -namespace framing { - -class BodyHandler; -class AMQMethodBody; -class ChannelAdapter; - -/** - * Invocation context for an AMQP method. - * - * It provides the method being processed and the channel on which - * it arrived. - * - * All Handler functions take a MethodContext as the last parameter. - */ -struct MethodContext -{ - typedef boost::shared_ptr<AMQMethodBody> BodyPtr; - - MethodContext(ChannelAdapter* ch=0, BodyPtr method=BodyPtr()) - : channel(ch), methodBody(method) {} - - /** - * Channel on which the method being processed arrived. - * 0 if the method was constructed by the caller - * rather than received from a channel. - */ - ChannelAdapter* channel; - - /** - * Body of the method being processed. - * It's useful for passing around instead of unpacking all its parameters. - * It's also provides the request ID when constructing a response. - */ - BodyPtr methodBody; -}; - - -}} // namespace qpid::framing - - - -#endif /*!_framing_MethodContext_h*/ diff --git a/cpp/src/tests/MockChannel.h b/cpp/src/tests/MockChannel.h index 908a222614..fb2de98d2a 100644 --- a/cpp/src/tests/MockChannel.h +++ b/cpp/src/tests/MockChannel.h @@ -19,7 +19,6 @@ * */ -#include "qpid/framing/MethodContext.h" #include "qpid/framing/ChannelAdapter.h" #include "qpid/framing/OutputHandler.h" #include "qpid/framing/AMQFrame.h" @@ -58,12 +57,7 @@ struct MockChannel : public qpid::framing::ChannelAdapter boost::shared_ptr<qpid::framing::AMQContentBody> b) { send(b); } void handleHeartbeat( boost::shared_ptr<qpid::framing::AMQHeartbeatBody> b) { send(b); } - void handleMethodInContext( - boost::shared_ptr<qpid::framing::AMQMethodBody> method, - const qpid::framing::MethodContext& context) - { - context.channel->send(method); - }; + void handleMethod(boost::shared_ptr<qpid::framing::AMQMethodBody> method) { send(method); }; }; diff --git a/cpp/src/tests/ReferenceTest.cpp b/cpp/src/tests/ReferenceTest.cpp index e8b759264b..b3dd44bf7d 100644 --- a/cpp/src/tests/ReferenceTest.cpp +++ b/cpp/src/tests/ReferenceTest.cpp @@ -70,11 +70,11 @@ class ReferenceTest : public CppUnit::TestCase MessageTransferBody::shared_ptr t1(new MessageTransferBody(v)); // TODO aconway 2007-04-03: hack around lack of generated setters. Clean this up. const_cast<framing::Content&>(t1->getBody()) = framing::Content(REFERENCE,"bar"); - MessageMessage::shared_ptr m1(new MessageMessage(0, 1, t1, r1)); + MessageMessage::shared_ptr m1(new MessageMessage(0, t1, r1)); MessageTransferBody::shared_ptr t2(new MessageTransferBody(v)); const_cast<framing::Content&>(t2->getBody()) = framing::Content(REFERENCE,"bar"); - MessageMessage::shared_ptr m2(new MessageMessage(0, 2, t2, r1)); + MessageMessage::shared_ptr m2(new MessageMessage(0, t2, r1)); MessageAppendBody::shared_ptr a1(new MessageAppendBody(v)); MessageAppendBody::shared_ptr a2(new MessageAppendBody(v)); |