summaryrefslogtreecommitdiff
path: root/orkbasecxx/messages/RecordMsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'orkbasecxx/messages/RecordMsg.cpp')
-rw-r--r--orkbasecxx/messages/RecordMsg.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/orkbasecxx/messages/RecordMsg.cpp b/orkbasecxx/messages/RecordMsg.cpp
new file mode 100644
index 0000000..46f3778
--- /dev/null
+++ b/orkbasecxx/messages/RecordMsg.cpp
@@ -0,0 +1,51 @@
+/*
+ * 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 "RecordMsg.h"
+#include "messages/AsyncMessage.h"
+#include "CapturePluginProxy.h"
+
+#define RECORD_CLASS "record"
+
+void RecordMsg::Define(Serializer* s)
+{
+ CStdString recordClass(RECORD_CLASS);
+ s->StringValue(OBJECT_TYPE_TAG, recordClass, true);
+ s->StringValue(PARTY_PARAM, m_party, true);
+}
+
+
+CStdString RecordMsg::GetClassName()
+{
+ return CStdString(RECORD_CLASS);
+}
+
+ObjectRef RecordMsg::NewInstance()
+{
+ return ObjectRef(new RecordMsg);
+}
+
+ObjectRef RecordMsg::Process()
+{
+ SimpleResponseMsg* msg = new SimpleResponseMsg;
+ ObjectRef ref(msg);
+ CStdString logMsg;
+
+ logMsg.Format("Starting capture for %s", m_party);
+ CapturePluginProxy::Singleton()->StartCapture(m_party);
+ msg->m_success = true;
+ msg->m_comment = logMsg;
+
+ return ref;
+}
+