diff options
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) |
