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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
* 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 "Utils.h"
#include "TapeMsg.h"
#include "ConfigManager.h"
TapeMsg::TapeMsg()
{
// Here is where default values are set
m_timestamp = 0;
m_direction = CaptureEvent::DirectionToString(CaptureEvent::DirUnkn);
m_duration = 0;
m_serviceName = CONFIG.m_serviceName;
}
void TapeMsg::Define(Serializer* s)
{
DefineMessage(s);
CStdString tapeMessageName(TAPE_MESSAGE_NAME);
s->StringValue(OBJECT_TYPE_TAG, tapeMessageName, true);
s->StringValue(REC_ID_PARAM, m_recId, true);
s->StringValue(STAGE_PARAM, m_stage, true);
s->StringValue(CAPTURE_PORT_PARAM, m_capturePort, true);
s->IntValue(TIMESTAMP_PARAM, (int&)m_timestamp, true);
s->StringValue(FILENAME_PARAM, m_fileName, true);
s->StringValue(LOCALPARTY_PARAM, m_localParty);
s->StringValue(LOCALENTRYPOINT_PARAM, m_localEntryPoint);
s->StringValue(REMOTEPARTY_PARAM, m_remoteParty);
s->StringValue(DIRECTION_PARAM, m_direction);
s->IntValue(DURATION_PARAM, m_duration);
s->StringValue(SERVICE_PARAM, m_serviceName);
}
void TapeMsg::Validate()
{
}
CStdString TapeMsg::GetClassName()
{
return CStdString(TAPE_MESSAGE_NAME);
}
ObjectRef TapeMsg::NewInstance()
{
return ObjectRef(new TapeMsg);
}
//==========================================================
TapeResponse::TapeResponse()
{
m_deleteTape = false;
}
void TapeResponse::Define(Serializer* s)
{
SimpleResponseMsg::Define(s);
s->BoolValue("deletetape", m_deleteTape);
}
CStdString TapeResponse::GetClassName()
{
return CStdString("taperesponse");
}
ObjectRef TapeResponse::NewInstance()
{
return ObjectRef(new TapeResponse);
}
|