You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2010/03/17 20:16:01 UTC

svn commit: r924424 - in /qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management: ManagementAgent.cpp ManagementAgent.h

Author: kgiusti
Date: Wed Mar 17 19:16:01 2010
New Revision: 924424

URL: http://svn.apache.org/viewvc?rev=924424&view=rev
Log:
compiles... added TODO notes

Modified:
    qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.cpp
    qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.h

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.cpp?rev=924424&r1=924423&r2=924424&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.cpp (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.cpp Wed Mar 17 19:16:01 2010
@@ -754,6 +754,7 @@ bool ManagementAgent::dispatchCommand (D
 void ManagementAgent::handleMethodRequestLH (Buffer& inBuffer, string replyToKey,
                                              uint32_t sequence, const ConnectionToken* connToken)
 {
+    // @todo KAG use new method req format
     string   methodName;
     string   packageName;
     string   className;
@@ -935,6 +936,7 @@ void ManagementAgent::handleClassIndLH (
         uint32_t outLen;
         uint32_t sequence = nextRequestSequence++;
 
+        // Schema Request
         encodeHeader (outBuffer, 'S', sequence);
         outBuffer.putShortString(packageName);
         key.encode(outBuffer);
@@ -971,6 +973,7 @@ void ManagementAgent::SchemaClass::appen
 
 void ManagementAgent::handleSchemaRequestLH(Buffer& inBuffer, string replyToKey, uint32_t sequence)
 {
+    // @todo KAG: use new schema format
     string         packageName;
     SchemaClassKey key;
 
@@ -1012,6 +1015,7 @@ void ManagementAgent::handleSchemaRespon
     string         packageName;
     SchemaClassKey key;
 
+    // KAG: TODO - Handle new schema format
     inBuffer.record();
     inBuffer.getOctet();
     inBuffer.getShortString(packageName);
@@ -1254,6 +1258,8 @@ void ManagementAgent::handleGetQueryLH (
 
 bool ManagementAgent::authorizeAgentMessageLH(Message& msg)
 {
+    // KAG TODO: handle both old and new clients
+
     Buffer   inBuffer (inputBuffer, MA_BUFFER_SIZE);
     uint8_t  opcode;
     uint32_t sequence;
@@ -1582,6 +1588,22 @@ void ManagementAgent::SchemaClassKey::ma
     }
 }
 
+void ManagementAgent::SchemaClassKey::encode(qpid::framing::Buffer& buffer) const {
+    buffer.checkAvailable(encodedBufSize());
+    buffer.putShortString(name);
+    buffer.putBin128(hash);
+}
+
+void ManagementAgent::SchemaClassKey::decode(qpid::framing::Buffer& buffer) {
+    buffer.checkAvailable(encodedBufSize());
+    buffer.getShortString(name);
+    buffer.getBin128(hash);
+}
+
+uint32_t ManagementAgent::SchemaClassKey::encodedBufSize() const {
+    return 1 + name.size() + 16 /* bin128 */;
+}
+
 void ManagementAgent::SchemaClass::mapEncode(qpid::messaging::Variant::Map& _map) const {
     _map["_type"] = kind;
     _map["_pending_sequence"] = pendingSequence;

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.h
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.h?rev=924424&r1=924423&r2=924424&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.h (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/management/ManagementAgent.h Wed Mar 17 19:16:01 2010
@@ -177,6 +177,9 @@ private:
 
         void mapEncode(qpid::messaging::Variant::Map& _map) const;
         void mapDecode(const qpid::messaging::Variant::Map& _map);
+        void encode(framing::Buffer& buffer) const;
+        void decode(framing::Buffer& buffer);
+        uint32_t encodedBufSize() const;
     };
 
     struct SchemaClassKeyComp



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org