summaryrefslogtreecommitdiff
path: root/orkbasecxx/messages/RecordMsg.cpp
blob: 46f3778284c170fffcc0afb21e97cb13e337b595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
}