Author: gordonsim
Date: 2007-10-02 08:35:40 -0400 (Tue, 02 Oct 2007)
New Revision: 959
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/BdbMessageStore.h
Log:
Make message arg const in append- and load- Content
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2007-10-01 15:16:57 UTC (rev 958)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2007-10-02 12:35:40 UTC (rev 959)
@@ -663,7 +663,7 @@
return peek.get_size();
}
-void BdbMessageStore::appendContent(PersistableMessage& msg, const std::string&
data)
+void BdbMessageStore::appendContent(const PersistableMessage& msg, const
std::string& data)
{
u_int64_t messageId (msg.getPersistenceId());
if (messageId != 0) {
@@ -690,7 +690,7 @@
THROW_STORE_EXCEPTION("Cannot append content. Message not known to
store!");
}
}
-void BdbMessageStore::loadContent(PersistableMessage& msg, std::string& data,
u_int64_t offset, u_int32_t length)
+void BdbMessageStore::loadContent(const PersistableMessage& msg, std::string&
data, u_int64_t offset, u_int32_t length)
{
u_int64_t realOffset = offset + sizeof(u_int32_t)/*header length*/+
msg.encodedHeaderSize();
u_int64_t messageId (msg.getPersistenceId());
Modified: store/trunk/cpp/lib/BdbMessageStore.h
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.h 2007-10-01 15:16:57 UTC (rev 958)
+++ store/trunk/cpp/lib/BdbMessageStore.h 2007-10-02 12:35:40 UTC (rev 959)
@@ -139,8 +139,8 @@
void stage(qpid::broker::PersistableMessage& msg);
void destroy(qpid::broker::PersistableMessage& msg);
- void appendContent(qpid::broker::PersistableMessage& msg, const
std::string& data);
- void loadContent(qpid::broker::PersistableMessage& msg, std::string&
data, u_int64_t offset, u_int32_t length);
+ void appendContent(const qpid::broker::PersistableMessage& msg, const
std::string& data);
+ void loadContent(const qpid::broker::PersistableMessage& msg,
std::string& data, u_int64_t offset, u_int32_t length);
void enqueue(qpid::broker::TransactionContext* ctxt,
qpid::broker::PersistableMessage& msg,
Show replies by date