qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r581209 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/broker/ tests/
Date Tue, 02 Oct 2007 12:35:00 GMT
Author: gsim
Date: Tue Oct  2 05:34:59 2007
New Revision: 581209

URL: http://svn.apache.org/viewvc?rev=581209&view=rev
Log:
mark Message::sendContent() as const


Modified:
    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/MessageStore.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h
    incubator/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp

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=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp Tue Oct  2 05:34:59 2007
@@ -139,7 +139,7 @@
     frames.remove(TypeFilter(CONTENT_BODY));
 }
 
-void Message::sendContent(framing::FrameHandler& out, uint16_t maxFrameSize)
+void Message::sendContent(framing::FrameHandler& out, uint16_t maxFrameSize) const
 {
     if (isContentReleased()) {
         //load content from store in chunks of maxContentSize

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=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h Tue Oct  2 05:34:59 2007
@@ -114,7 +114,7 @@
      */
     void releaseContent(MessageStore* store);
 
-    void sendContent(framing::FrameHandler& out, uint16_t maxFrameSize);
+    void sendContent(framing::FrameHandler& out, uint16_t maxFrameSize) const;
     void sendHeader(framing::FrameHandler& out, uint16_t maxFrameSize) const;
 
     bool isContentLoaded() const;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h Tue Oct  2 05:34:59 2007
@@ -89,7 +89,7 @@
     /**
      * Appends content to a previously staged message
      */
-    virtual void appendContent(PersistableMessage& msg, const std::string& data)
= 0;
+    virtual void appendContent(const PersistableMessage& msg, const std::string&
data) = 0;
     
     /**
      * Loads (a section) of content data for the specified
@@ -99,7 +99,7 @@
      * content should be loaded, not the headers or related
      * meta-data).
      */
-    virtual void loadContent(PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length) = 0;
+    virtual void loadContent(const PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length) = 0;
     
     /**
      * Enqueues a message, storing the message if it has not

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp Tue Oct  2 05:34:59
2007
@@ -75,12 +75,12 @@
     store->destroy(msg);
 }
 
-void MessageStoreModule::appendContent(PersistableMessage& msg, const std::string&
data)
+void MessageStoreModule::appendContent(const PersistableMessage& msg, const std::string&
data)
 {
     store->appendContent(msg, data);
 }
 
-void MessageStoreModule::loadContent(PersistableMessage& msg, string& data, uint64_t
offset, uint32_t length)
+void MessageStoreModule::loadContent(const PersistableMessage& msg, string& data,
uint64_t offset, uint32_t length)
 {
     store->loadContent(msg, data, offset, length);
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h Tue Oct  2 05:34:59
2007
@@ -56,8 +56,8 @@
     void recover(RecoveryManager& queues);
     void stage(PersistableMessage& msg);
     void destroy(PersistableMessage& msg);
-    void appendContent(PersistableMessage& msg, const std::string& data);
-    void loadContent(PersistableMessage& msg, std::string& data, uint64_t offset,
uint32_t length);
+    void appendContent(const PersistableMessage& msg, const std::string& data);
+    void loadContent(const PersistableMessage& msg, std::string& data, uint64_t offset,
uint32_t length);
 
     void enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp Tue Oct  2 05:34:59
2007
@@ -87,12 +87,12 @@
     QPID_LOG(info, "No need to destroy staged message. Persistence not enabled.");
 }
 
-void NullMessageStore::appendContent(PersistableMessage&, const string&)
+void NullMessageStore::appendContent(const PersistableMessage&, const string&)
 {
     QPID_LOG(info, "Can't load content. Persistence not enabled.");
 }
 
-void NullMessageStore::loadContent(PersistableMessage&, string&, uint64_t, uint32_t)
+void NullMessageStore::loadContent(const PersistableMessage&, string&, uint64_t,
uint32_t)
 {
     QPID_LOG(info, "Can't load content. Persistence not enabled.");
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h Tue Oct  2 05:34:59 2007
@@ -57,8 +57,8 @@
     virtual void recover(RecoveryManager& queues);
     virtual void stage(PersistableMessage& msg);
     virtual void destroy(PersistableMessage& msg);
-    virtual void appendContent(PersistableMessage& msg, const std::string& data);
-    virtual void loadContent(PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length);
+    virtual void appendContent(const PersistableMessage& msg, const std::string&
data);
+    virtual void loadContent(const PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length);
     virtual void enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     virtual void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     virtual u_int32_t outstandingQueueAIO(const PersistableQueue& queue);

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp?rev=581209&r1=581208&r2=581209&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp Tue Oct  2 05:34:59 2007
@@ -71,10 +71,10 @@
             msg.setPersistenceId(++id);
         }
 
-        void appendContent(PersistableMessage& msg, const string& data)
+        void appendContent(const PersistableMessage& msg, const string& data)
         {
             checkExpectation(APPEND);
-            CPPUNIT_ASSERT_EQUAL(expectedMsg, &msg);
+            CPPUNIT_ASSERT_EQUAL((const PersistableMessage*) expectedMsg, &msg);
             CPPUNIT_ASSERT_EQUAL(expectedData, data);            
         }
 



Mime
View raw message