diff options
| author | Alan Conway <aconway@apache.org> | 2007-11-15 20:49:25 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-11-15 20:49:25 +0000 |
| commit | d8dd71de008990f5a665e0191c231ae62fcf44fb (patch) | |
| tree | b08619a89797104a49844899c6e76524122e873d /cpp/src/qpid/management/Vhost.cpp | |
| parent | 183d5f625300bef0f2e584c5e4e2fd630d9969f1 (diff) | |
| download | qpid-python-d8dd71de008990f5a665e0191c231ae62fcf44fb.tar.gz | |
QPID-687: comitted qpid-patch7-cpp.diff qpid-patch7-python.diff
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@595453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/management/Vhost.cpp')
| -rw-r--r-- | cpp/src/qpid/management/Vhost.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/cpp/src/qpid/management/Vhost.cpp b/cpp/src/qpid/management/Vhost.cpp index effcb1599c..c4fb84e8f2 100644 --- a/cpp/src/qpid/management/Vhost.cpp +++ b/cpp/src/qpid/management/Vhost.cpp @@ -21,6 +21,7 @@ #include "Manageable.h" #include "Vhost.h" +#include "qpid/framing/FieldTable.h" using namespace qpid::management; using namespace qpid::sys; @@ -29,7 +30,7 @@ using namespace qpid::framing; bool Vhost::schemaNeeded = true; Vhost::Vhost (Manageable* _core, Manageable* _parent) : - ManagementObject (_core), name("/") + ManagementObject (_core, "vhost"), name("/") { brokerRef = _parent->GetManagementObject ()->getObjectId (); } @@ -38,12 +39,33 @@ Vhost::~Vhost () {} void Vhost::writeSchema (Buffer& buf) { + FieldTable ft; + schemaNeeded = false; - schemaListBegin (buf); - schemaItem (buf, TYPE_UINT64, "brokerRef", "Broker Reference" , true); - schemaItem (buf, TYPE_STRING, "name", "Name of virtual host", true); - schemaListEnd (buf); + // Schema class header: + buf.putShortString (className); // Class Name + buf.putShort (2); // Config Element Count + buf.putShort (0); // Inst Element Count + buf.putShort (0); // Method Count + buf.putShort (0); // Event Count + + // Config Elements + ft = FieldTable (); + ft.setString ("name", "brokerRef"); + ft.setInt ("type", TYPE_U64); + ft.setInt ("access", ACCESS_RC); + ft.setInt ("index", 1); + ft.setString ("desc", "Broker Reference"); + buf.put (ft); + + ft = FieldTable (); + ft.setString ("name", "name"); + ft.setInt ("type", TYPE_SSTR); + ft.setInt ("access", ACCESS_RO); + ft.setInt ("index", 1); + ft.setString ("desc", "Name of virtual host"); + buf.put (ft); } void Vhost::writeConfig (Buffer& buf) |
