summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/management/ManagementObject.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/management/ManagementObject.cpp b/cpp/src/qpid/management/ManagementObject.cpp
index 6cbe386517..4ac6613419 100644
--- a/cpp/src/qpid/management/ManagementObject.cpp
+++ b/cpp/src/qpid/management/ManagementObject.cpp
@@ -121,7 +121,7 @@ bool ObjectId::operator<(const ObjectId &other) const
return (first < otherFirst) || ((first == otherFirst) && (second < other.second));
}
-void ObjectId::encode(framing::Buffer& buffer)
+void ObjectId::encode(framing::Buffer& buffer) const
{
if (agent == 0)
buffer.putLongLong(first);
@@ -158,7 +158,7 @@ std::ostream& operator<<(std::ostream& out, const ObjectId& i)
int ManagementObject::maxThreads = 1;
int ManagementObject::nextThreadIndex = 0;
-void ManagementObject::writeTimestamps (framing::Buffer& buf)
+void ManagementObject::writeTimestamps (framing::Buffer& buf) const
{
buf.putShortString (getPackageName ());
buf.putShortString (getClassName ());
@@ -184,6 +184,17 @@ void ManagementObject::readTimestamps (framing::Buffer& buf)
unusedObjectId.decode(buf);
}
+uint32_t ManagementObject::writeTimestampsSize() const
+{
+ return 1 + getPackageName().length() + // str8
+ 1 + getClassName().length() + // str8
+ 16 + // bin128
+ 8 + // uint64
+ 8 + // uint64
+ 8 + // uint64
+ objectId.encodedSize(); // objectId
+}
+
void ManagementObject::setReference(ObjectId) {}
int ManagementObject::getThreadIndex() {