qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r593692 - in /incubator/qpid/trunk/qpid/cpp/src: ./ qpid/broker/ qpid/framing/ tests/
Date Fri, 09 Nov 2007 23:31:06 GMT
Author: aconway
Date: Fri Nov  9 15:30:59 2007
New Revision: 593692

URL: http://svn.apache.org/viewvc?rev=593692&view=rev
Log:

Get rid of BasicHeaderProperties, dead code from 0-8 protocol.

Removed:
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/BasicHeaderProperties.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/BasicHeaderProperties.h
Modified:
    incubator/qpid/trunk/qpid/cpp/src/Makefile.am
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/FrameSet.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_framing.h
    incubator/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/Makefile.am?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/Makefile.am Fri Nov  9 15:30:59 2007
@@ -99,7 +99,6 @@
   qpid/framing/AMQHeaderBody.cpp \
   qpid/framing/AMQHeartbeatBody.cpp \
   qpid/framing/Array.cpp \
-  qpid/framing/BasicHeaderProperties.cpp \
   qpid/framing/BodyHandler.cpp \
   qpid/framing/ChannelAdapter.cpp \
   qpid/framing/Buffer.cpp \
@@ -343,7 +342,6 @@
   qpid/framing/AMQP_HighestVersion.h \
   qpid/framing/AccumulatedAck.h \
   qpid/framing/Array.h \
-  qpid/framing/BasicHeaderProperties.h \
   qpid/framing/Blob.h \
   qpid/framing/BodyHandler.h \
   qpid/framing/Buffer.h \

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp Fri Nov  9 15:30:59 2007
@@ -34,7 +34,6 @@
 using std::string;
 
 TransferAdapter Message::TRANSFER;
-PublishAdapter Message::PUBLISH;
 
 Message::Message(const SequenceNumber& id) : frames(id), persistenceId(0), redelivered(false),
loaded(false), publisher(0), adapter(0) {}
 
@@ -190,12 +189,12 @@
     frames.map_if(f, TypeFilter(HEADER_BODY));    
 }
 
+// FIXME aconway 2007-11-09: Obsolete, remove. Was used to cover over
+// 0-8/0-9 message differences.
 MessageAdapter& Message::getAdapter() const
 {
     if (!adapter) {
-        if (frames.isA<BasicPublishBody>()) {
-            adapter = &PUBLISH;
-        } else if(frames.isA<MessageTransferBody>()) {
+        if(frames.isA<MessageTransferBody>()) {
             adapter = &TRANSFER;
         } else {
             const AMQMethodBody* method = frames.getMethod();

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h Fri Nov  9 15:30:59 2007
@@ -130,7 +130,6 @@
     mutable MessageAdapter* adapter;
 
     static TransferAdapter TRANSFER;
-    static PublishAdapter PUBLISH;
 
     MessageAdapter& getAdapter() const;
 };

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.cpp Fri Nov  9 15:30:59 2007
@@ -28,33 +28,6 @@
 namespace qpid {
 namespace broker{
 
-    std::string PublishAdapter::getRoutingKey(const framing::FrameSet& f)
-    {
-        return f.as<framing::BasicPublishBody>()->getRoutingKey();
-    }
-
-    std::string PublishAdapter::getExchange(const framing::FrameSet& f)
-    {
-        return f.as<framing::BasicPublishBody>()->getExchange();
-    }
-
-    bool PublishAdapter::isImmediate(const framing::FrameSet& f)
-    {
-        return f.as<framing::BasicPublishBody>()->getImmediate();
-    }
-
-    const framing::FieldTable* PublishAdapter::getApplicationHeaders(const framing::FrameSet&
f)
-    {
-        const framing::BasicHeaderProperties* p = f.getHeaders()->get<framing::BasicHeaderProperties>();
-        return p ? &(p->getHeaders()) : 0;
-    }
-
-    bool PublishAdapter::isPersistent(const framing::FrameSet& f)
-    {
-        const framing::BasicHeaderProperties* p = f.getHeaders()->get<framing::BasicHeaderProperties>();
-        return p && p->getDeliveryMode() == 2;
-    }
-
     std::string TransferAdapter::getRoutingKey(const framing::FrameSet& f)
     {
         const framing::DeliveryProperties* p = f.getHeaders()->get<framing::DeliveryProperties>();

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.h?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageAdapter.h Fri Nov  9 15:30:59 2007
@@ -24,7 +24,6 @@
 
 #include <string>
 #include "qpid/framing/BasicPublishBody.h"
-#include "qpid/framing/BasicHeaderProperties.h"
 #include "qpid/framing/FieldTable.h"
 #include "qpid/framing/FrameSet.h"
 #include "qpid/framing/DeliveryProperties.h"
@@ -34,6 +33,7 @@
 namespace qpid {	
 namespace broker {
 
+// FIXME aconway 2007-11-09: No longer needed, we only have one type of message.
 struct MessageAdapter
 {
     virtual ~MessageAdapter() {}
@@ -43,15 +43,6 @@
     virtual bool isImmediate(const framing::FrameSet& f) = 0;
     virtual const framing::FieldTable* getApplicationHeaders(const framing::FrameSet&
f) = 0;
     virtual bool isPersistent(const framing::FrameSet& f) = 0;
-};
-
-struct PublishAdapter : MessageAdapter
-{
-    std::string getRoutingKey(const framing::FrameSet& f);
-    std::string getExchange(const framing::FrameSet& f);
-    bool isImmediate(const framing::FrameSet& f);
-    const framing::FieldTable* getApplicationHeaders(const framing::FrameSet& f);
-    bool isPersistent(const framing::FrameSet& f);
 };
 
 struct TransferAdapter : MessageAdapter

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.cpp Fri Nov  9 15:30:59 2007
@@ -44,9 +44,6 @@
         uint16_t type = buffer.getShort();
         //The following switch could be generated as the number of options increases:
         switch(type) {
-        case BasicHeaderProperties::TYPE: 
-            decode(BasicHeaderProperties(), buffer, len - 2);
-            break;
         case MessageProperties::TYPE:
             decode(MessageProperties(), buffer, len - 2);
             break;
@@ -65,10 +62,6 @@
     const MessageProperties* mProps = get<MessageProperties>();
     if (mProps) {
         return mProps->getContentLength();
-    }
-    const BasicHeaderProperties* bProps = get<BasicHeaderProperties>();
-    if (bProps) {
-        return bProps->getContentLength();
     }
     return 0;
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.h?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQHeaderBody.h Fri Nov  9 15:30:59 2007
@@ -21,7 +21,6 @@
 #include "amqp_types.h"
 #include "AMQBody.h"
 #include "Buffer.h"
-#include "BasicHeaderProperties.h"
 #include "qpid/framing/DeliveryProperties.h"
 #include "qpid/framing/MessageProperties.h"
 #include <iostream>
@@ -37,15 +36,10 @@
 
 class AMQHeaderBody :  public AMQBody
 {
-    typedef std::vector< boost::variant<BasicHeaderProperties, DeliveryProperties,
MessageProperties> > PropertyList; 
+    typedef std::vector< boost::variant<DeliveryProperties, MessageProperties> >
PropertyList; 
 
     PropertyList properties;
 
-    void decode(BasicHeaderProperties s, Buffer& b, uint32_t size) {
-        s.decode(b, size);
-        properties.push_back(s);
-    }
-
     template <class T> void decode(T t, Buffer& b, uint32_t size) {
         t.decodeStructBody(b, size);
         properties.push_back(t);
@@ -60,11 +54,6 @@
             t.encode(buffer);
         }
 
-        void operator()(const BasicHeaderProperties& s) const {
-            buffer.putLong(s.size() + 2/*typecode*/);
-            buffer.putShort(BasicHeaderProperties::TYPE);           
-            s.encode(buffer);
-        }
     };
 
     class CalculateSize : public boost::static_visitor<> {
@@ -74,10 +63,6 @@
 
         template <class T> void operator()(T& t) {
             size += t.size();
-        }
-
-        void operator()(const BasicHeaderProperties& s) {
-            size += s.size() + 2/*typecode*/ + 4/*size field*/;
         }
 
         uint32_t totalSize() { 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/FrameSet.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/FrameSet.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/FrameSet.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/FrameSet.cpp Fri Nov  9 15:30:59 2007
@@ -22,7 +22,6 @@
 #include "FrameSet.h"
 #include "qpid/framing/all_method_bodies.h"
 #include "qpid/framing/frame_functors.h"
-#include "qpid/framing/BasicHeaderProperties.h"
 #include "qpid/framing/MessageProperties.h"
 #include "qpid/framing/TypeFilter.h"
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_framing.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_framing.h?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_framing.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_framing.h Fri Nov  9 15:30:59 2007
@@ -30,5 +30,4 @@
 #include "OutputHandler.h"
 #include "InitiationHandler.h"
 #include "ProtocolInitiation.h"
-#include "BasicHeaderProperties.h"
 #include "ProtocolVersion.h"

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp Fri Nov  9 15:30:59 2007
@@ -24,21 +24,23 @@
 #include "qpid_test_plugin.h"
 
 using namespace qpid::framing;
+using namespace std;
 
 class HeaderTest : public CppUnit::TestCase  
 {
     CPPUNIT_TEST_SUITE(HeaderTest);
     CPPUNIT_TEST(testGenericProperties);
-    CPPUNIT_TEST(testAllSpecificProperties);
-    CPPUNIT_TEST(testSomeSpecificProperties);
+    CPPUNIT_TEST(testMessageProperties);
+    CPPUNIT_TEST(testDeliveryProperies);
     CPPUNIT_TEST_SUITE_END();
 
-public:
+  public:
 
     void testGenericProperties() 
     {
         AMQHeaderBody body;
-        body.get<BasicHeaderProperties>(true)->getHeaders().setString("A", "BCDE");
+        body.get<MessageProperties>(true)->getApplicationHeaders().setString(
+            "A", "BCDE");
         char buff[100];
         Buffer wbuffer(buff, 100);
         body.encode(wbuffer);
@@ -46,44 +48,29 @@
         Buffer rbuffer(buff, 100);
         AMQHeaderBody body2;
         body2.decode(rbuffer, body.size());
-        BasicHeaderProperties* props =
-            body2.get<BasicHeaderProperties>(true);
-        CPPUNIT_ASSERT(StringValue("BCDE") == *props->getHeaders().get("A"));
+        MessageProperties* props =
+            body2.get<MessageProperties>(true);
+        CPPUNIT_ASSERT_EQUAL(
+            string("BCDE"),
+            props->getApplicationHeaders().get("A")->get<string>());
     }
 
-    void testAllSpecificProperties(){
-	string contentType("text/html");
-	string contentEncoding("UTF8");
-	DeliveryMode deliveryMode(PERSISTENT);
-	uint8_t priority(3);
-	string correlationId("abc");
-	string replyTo("no-address");
-	string expiration("why is this a string?");
-	string messageId("xyz");
-	uint64_t timestamp(0xabcd);
-	string type("eh?");
-	string userId("guest");
-	string appId("just testing");
-	string clusterId("no clustering required");
-        uint64_t contentLength(54321);
-
+    void testMessageProperties() {
         AMQFrame out(0, AMQHeaderBody());
-        BasicHeaderProperties* properties = 
-            out.castBody<AMQHeaderBody>()->get<BasicHeaderProperties>(true);
-        properties->setContentType(contentType);
-        properties->getHeaders().setString("A", "BCDE");
-        properties->setDeliveryMode(deliveryMode);
-        properties->setPriority(priority);
-        properties->setCorrelationId(correlationId);
-        properties->setReplyTo(replyTo);
-        properties->setExpiration(expiration);
-        properties->setMessageId(messageId);
-        properties->setTimestamp(timestamp);
-        properties->setType(type);
-        properties->setUserId(userId);
-        properties->setAppId(appId);
-        properties->setClusterId(clusterId);
-        properties->setContentLength(contentLength);
+        MessageProperties* props1 = 
+            out.castBody<AMQHeaderBody>()->get<MessageProperties>(true);
+
+        props1->setContentLength(42);
+        props1->setMessageId("messageId");
+        props1->setCorrelationId("correlationId");
+        props1->setReplyTo(ReplyTo("ex","key"));
+        props1->setContentType("contentType");
+        props1->setContentEncoding("contentEncoding");
+        props1->setType("type");
+        props1->setUserId("userId");
+        props1->setAppId("appId");
+        props1->setTransactionId("transactionId");
+        props1->setSecurityToken("securityToken");
 
         char buff[10000];
         Buffer wbuffer(buff, 10000);
@@ -92,55 +79,45 @@
         Buffer rbuffer(buff, 10000);
         AMQFrame in;
         in.decode(rbuffer);
-        properties = in.castBody<AMQHeaderBody>()->get<BasicHeaderProperties>(true);
+        MessageProperties* props2 =
+            in.castBody<AMQHeaderBody>()->get<MessageProperties>(true);
+
+        CPPUNIT_ASSERT_EQUAL(props1->getContentLength(), props2->getContentLength());
+        CPPUNIT_ASSERT_EQUAL(props1->getMessageId(), props2->getMessageId());
+        CPPUNIT_ASSERT_EQUAL(props1->getCorrelationId(), props2->getCorrelationId());
+        CPPUNIT_ASSERT_EQUAL(props1->getContentType(), props2->getContentType());
+        CPPUNIT_ASSERT_EQUAL(props1->getContentEncoding(), props2->getContentEncoding());
+        CPPUNIT_ASSERT_EQUAL(props1->getType(), props2->getType());
+        CPPUNIT_ASSERT_EQUAL(props1->getUserId(), props2->getUserId());
+        CPPUNIT_ASSERT_EQUAL(props1->getAppId(), props2->getAppId());
+        CPPUNIT_ASSERT_EQUAL(props1->getTransactionId(), props2->getTransactionId());
+        CPPUNIT_ASSERT_EQUAL(props1->getSecurityToken(), props2->getSecurityToken());
 
-        CPPUNIT_ASSERT_EQUAL(contentType, properties->getContentType());
-        CPPUNIT_ASSERT(StringValue("BCDE") == *properties->getHeaders().get("A"));
-        CPPUNIT_ASSERT_EQUAL(deliveryMode, properties->getDeliveryMode());
-        CPPUNIT_ASSERT_EQUAL(priority, properties->getPriority());
-        CPPUNIT_ASSERT_EQUAL(correlationId, properties->getCorrelationId());
-        CPPUNIT_ASSERT_EQUAL(replyTo, properties->getReplyTo());
-        CPPUNIT_ASSERT_EQUAL(expiration, properties->getExpiration());
-        CPPUNIT_ASSERT_EQUAL(messageId, properties->getMessageId());
-        CPPUNIT_ASSERT_EQUAL(timestamp, properties->getTimestamp());
-        CPPUNIT_ASSERT_EQUAL(type, properties->getType());
-        CPPUNIT_ASSERT_EQUAL(userId, properties->getUserId());
-        CPPUNIT_ASSERT_EQUAL(appId, properties->getAppId());
-        CPPUNIT_ASSERT_EQUAL(clusterId, properties->getClusterId());
-        CPPUNIT_ASSERT_EQUAL(contentLength, properties->getContentLength());
     }
 
-    void testSomeSpecificProperties(){
-        string contentType("application/octet-stream");
-        DeliveryMode deliveryMode(PERSISTENT);
-        uint8_t priority(6);
-        string expiration("Z");
-        uint64_t timestamp(0xabe4a34a);
+    void testDeliveryProperies() {
+        AMQFrame out(0, AMQHeaderBody());
+        DeliveryProperties* props1 = 
+            out.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true);
 
-        AMQHeaderBody body;
-        BasicHeaderProperties* properties = 
-            body.get<BasicHeaderProperties>(true);
-        properties->setContentType(contentType);
-        properties->setDeliveryMode(deliveryMode);
-        properties->setPriority(priority);
-        properties->setExpiration(expiration);
-        properties->setTimestamp(timestamp);
+        props1->setDiscardUnroutable(true);
+        props1->setExchange("foo");
 
-        char buff[100];
-        Buffer wbuffer(buff, 100);
-        body.encode(wbuffer);
+        char buff[10000];
+        Buffer wbuffer(buff, 10000);
+        out.encode(wbuffer);
 
-        Buffer rbuffer(buff, 100);
-        AMQHeaderBody temp;
-        temp.decode(rbuffer, body.size());
-        properties = temp.get<BasicHeaderProperties>(true);
-
-        CPPUNIT_ASSERT_EQUAL(contentType, properties->getContentType());
-        CPPUNIT_ASSERT_EQUAL((int) deliveryMode, (int) properties->getDeliveryMode());
-        CPPUNIT_ASSERT_EQUAL((int) priority, (int) properties->getPriority());
-        CPPUNIT_ASSERT_EQUAL(expiration, properties->getExpiration());
-        CPPUNIT_ASSERT_EQUAL(timestamp, properties->getTimestamp());
+        Buffer rbuffer(buff, 10000);
+        AMQFrame in;
+        in.decode(rbuffer);
+        DeliveryProperties* props2 =
+            in.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true);
+
+        CPPUNIT_ASSERT(props2->getDiscardUnroutable());
+        CPPUNIT_ASSERT_EQUAL(string("foo"), props2->getExchange());
+        CPPUNIT_ASSERT(!props2->hasTimestamp());
     }
+
 };
 
 // Make this test suite a plugin.

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp Fri Nov  9 15:30:59 2007
@@ -32,6 +32,9 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
+
+enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2};
+
 class MessageTest : public CppUnit::TestCase  
 {
     CPPUNIT_TEST_SUITE(MessageTest);

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp Fri Nov  9 15:30:59 2007
@@ -32,6 +32,8 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
+enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2};
+
 class TxAckTest : public CppUnit::TestCase  
 {
 

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp Fri Nov  9 15:30:59 2007
@@ -34,6 +34,8 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
+enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2};
+
 class TxPublishTest : public CppUnit::TestCase  
 {
     typedef std::pair<string, PersistableMessage*> msg_queue_pair;

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp?rev=593692&r1=593691&r2=593692&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp Fri Nov  9 15:30:59 2007
@@ -35,6 +35,8 @@
 using namespace client;
 using namespace sys;
 
+enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2};
+
 struct Opts : public TestOptions {
 
     bool listen;
@@ -165,7 +167,7 @@
         Message msg(string(msgSize, 'X'), "perftest");
         char* msgBuf = const_cast<char*>(msg.getData().data());
         if (opts.durable)
-	    msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT);
+	    msg.getDeliveryProperties().setDeliveryMode(PERSISTENT);
         // Time sending message.
         AbsTime start=now();
         if (!opts.summary) cout << "Publishing " << opts.count << " messages
" << flush;



Mime
View raw message