summaryrefslogtreecommitdiff
path: root/orkaudio/messages/PingMsg.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2005-10-20 13:40:58 +0000
committerHenri Herscher <henri@oreka.org>2005-10-20 13:40:58 +0000
commit7e1d63dd9fd149e4934bf77095c8610fac786b04 (patch)
tree5fe486a1b0300c3b84fb559107a868e5cc2c95da /orkaudio/messages/PingMsg.cpp
parent467768fc956fc3e5a253373f26c71c681b31b6b8 (diff)
First checkin
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@2 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/messages/PingMsg.cpp')
-rw-r--r--orkaudio/messages/PingMsg.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/orkaudio/messages/PingMsg.cpp b/orkaudio/messages/PingMsg.cpp
new file mode 100644
index 0000000..1f90bbe
--- /dev/null
+++ b/orkaudio/messages/PingMsg.cpp
@@ -0,0 +1,60 @@
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "PingMsg.h"
+
+#define PING_CLASS "ping"
+#define PING_RESPONSE_CLASS "pingresponse"
+
+void PingResponseMsg::Define(Serializer* s)
+{
+ s->BoolValue(SUCCESS_PARAM, m_success);
+}
+
+CStdString PingResponseMsg::GetClassName()
+{
+ return CStdString(PING_RESPONSE_CLASS);
+}
+
+ObjectRef PingResponseMsg::NewInstance()
+{
+ return ObjectRef(new PingResponseMsg);
+}
+
+//===============================
+
+void PingMsg::Define(Serializer* s)
+{
+ CStdString pingClass(PING_CLASS);
+ s->StringValue(OBJECT_TYPE_TAG, pingClass, true);
+}
+
+
+CStdString PingMsg::GetClassName()
+{
+ return CStdString(PING_CLASS);
+}
+
+ObjectRef PingMsg::NewInstance()
+{
+ return ObjectRef(new PingMsg);
+}
+
+ObjectRef PingMsg::Process()
+{
+ PingResponseMsg* msg = new PingResponseMsg;
+ ObjectRef ref(msg);
+ msg->m_success = true;
+ return ref;
+}
+