summaryrefslogtreecommitdiff
path: root/orkaudio/messages/PingMsg.cpp
blob: 1f90bbe8afd48ce63276b8ed1c2cbf71479e1558 (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
52
53
54
55
56
57
58
59
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;
}