summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/examples')
-rw-r--r--qpid/cpp/examples/qmf-agent/example.cpp3
-rw-r--r--qpid/cpp/examples/qmf-agent/schema.xml17
2 files changed, 10 insertions, 10 deletions
diff --git a/qpid/cpp/examples/qmf-agent/example.cpp b/qpid/cpp/examples/qmf-agent/example.cpp
index 7c514b1010..e24e729e1d 100644
--- a/qpid/cpp/examples/qmf-agent/example.cpp
+++ b/qpid/cpp/examples/qmf-agent/example.cpp
@@ -26,6 +26,7 @@
#include "qmf/org/apache/qpid/agent/example/Parent.h"
#include "qmf/org/apache/qpid/agent/example/Child.h"
#include "qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h"
+#include "qmf/org/apache/qpid/agent/example/EventChildCreated.h"
#include "qmf/org/apache/qpid/agent/example/Package.h"
#include <unistd.h>
@@ -129,7 +130,7 @@ Manageable::status_t CoreClass::ManagementMethod(uint32_t methodId, Args& args,
children.push_back(child);
- mgmtObject->event_childCreated(ioArgs.i_name);
+ agent->raiseEvent(_qmf::EventChildCreated(ioArgs.i_name));
return STATUS_OK;
}
diff --git a/qpid/cpp/examples/qmf-agent/schema.xml b/qpid/cpp/examples/qmf-agent/schema.xml
index 22ecabb8a5..1bf701a655 100644
--- a/qpid/cpp/examples/qmf-agent/schema.xml
+++ b/qpid/cpp/examples/qmf-agent/schema.xml
@@ -37,14 +37,6 @@
<arg name="name" dir="I" type="sstr"/>
<arg name="childRef" dir="O" type="objId"/>
</method>
-
- <event name="childCreated">
- <arg name="name" type="sstr"/>
- </event>
-
- <event name="childDestroyed">
- <arg name="name" type="sstr"/>
- </event>
</class>
@@ -59,7 +51,14 @@
<statistic name="count" type="count64" unit="tick" desc="Counter that increases monotonically"/>
- <method name="delete"/>
+ <method name="delete"/>
</class>
+
+ <eventArguments>
+ <arg name="childName" type="sstr"/>
+ </eventArguments>
+
+ <event name="ChildCreated" args="childName"/>
+ <event name="ChildDestroyed" args="childName"/>
</schema>