diff options
Diffstat (limited to 'qpid/cpp/examples/qmf-console/console.cpp')
-rw-r--r-- | qpid/cpp/examples/qmf-console/console.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/qpid/cpp/examples/qmf-console/console.cpp b/qpid/cpp/examples/qmf-console/console.cpp index c98f1ace34..5700d5556f 100644 --- a/qpid/cpp/examples/qmf-console/console.cpp +++ b/qpid/cpp/examples/qmf-console/console.cpp @@ -21,17 +21,9 @@ #include "qpid/console/ConsoleListener.h" #include "qpid/console/SessionManager.h" -#include "qpid/console/Value.h" -#include <unistd.h> -#include <cstdlib> -#include <iostream> - -#include <sstream> using namespace std; using namespace qpid::console; -using std::cout; -using std::endl; class Listener : public ConsoleListener { public: @@ -68,6 +60,10 @@ public: void objectStats(Broker& broker, Object& object) { cout << "objectStats: broker=" << broker << " object=" << object << endl; } + + void event(Event& event) { + cout << "event: " << event << endl; + } }; @@ -127,8 +123,8 @@ int main_int(int /*argc*/, char** /*argv*/) Object::AttributeMap args; MethodResponse result; - args["sequence"] = new UintValue(1); - args["body"] = new StringValue("Testing..."); + args.addUint("sequence", 1); + args.addString("body", "Testing..."); cout << "Call echo method..." << endl; broker.invokeMethod("echo", args, result); |