summaryrefslogtreecommitdiff
path: root/orkbasecxx/AudioTape.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2009-08-20 22:10:08 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2009-08-20 22:10:08 +0000
commiteec7b116d5db1716810a3210b1e895be309cb39c (patch)
tree3ceb98b75328b8dcf4922cee6be1149f9ab8b5ed /orkbasecxx/AudioTape.cpp
parent6d612d25b50447faffd8a78404dc08f1b9d28151 (diff)
Added a parameter to the tape message called "ondemand". This parameter is reported to orktrack. When a recording has been started by the API, instead of automatically, this parameter is set to 'true'.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@636 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/AudioTape.cpp')
-rw-r--r--orkbasecxx/AudioTape.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp
index 16d4107..d4b5f81 100644
--- a/orkbasecxx/AudioTape.cpp
+++ b/orkbasecxx/AudioTape.cpp
@@ -47,6 +47,7 @@ void AudioTapeDescription::Define(Serializer* s)
s->StringValue("localIp", m_localIp);
s->StringValue("remoteIp", m_remoteIp);
s->StringValue("filename", m_filename);
+ s->BoolValue("ondemand", m_onDemand);
}
void AudioTapeDescription::Validate(){}
@@ -85,6 +86,7 @@ AudioTape::AudioTape(CStdString &portId)
m_lastLogWarning = 0;
m_passedPartyFilterTest = false;
m_numErrors = 0;
+ m_onDemand = false;
GenerateCaptureFilePathAndIdentifier();
}
@@ -93,6 +95,7 @@ AudioTape::AudioTape(CStdString &portId, CStdString& file)
{
m_passedPartyFilterTest = false;
m_portId = portId;
+ m_onDemand = false;
// Extract Path and Identifier
m_filePath = FilePath(file);
@@ -317,6 +320,7 @@ void AudioTape::AddCaptureEvent(CaptureEventRef eventRef, bool send)
atd.m_remoteParty = m_remoteParty;
atd.m_localIp = m_localIp;
atd.m_remoteIp = m_remoteIp;
+ atd.m_onDemand = m_onDemand;
atd.m_filename = GetFilename();
CStdString description = atd.SerializeSingleLine();
LOG4CXX_INFO(LOG.tapelistLog, description);
@@ -369,6 +373,13 @@ void AudioTape::AddCaptureEvent(CaptureEventRef eventRef, bool send)
case CaptureEvent::EtCallId:
m_nativeCallId = eventRef->m_value;
break;
+ case CaptureEvent::EtKeyValue:
+ if(eventRef->m_key.CompareNoCase("ondemand") == 0)
+ {
+ // If this reported, the recording was started by the API
+ m_onDemand = true;
+ }
+ break;
}
{
@@ -447,6 +458,7 @@ void AudioTape::PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum ev
msg->m_localIp = m_localIp;
msg->m_remoteIp = m_remoteIp;
msg->m_nativeCallId = m_nativeCallId;
+ msg->m_onDemand = m_onDemand;
MutexSentinel sentinel(m_mutex);;
std::copy(m_tags.begin(), m_tags.end(), std::inserter(msg->m_tags, msg->m_tags.begin()));