summaryrefslogtreecommitdiff
path: root/orkbasecxx/AudioTape.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2007-02-09 02:21:10 +0000
committerHenri Herscher <henri@oreka.org>2007-02-09 02:21:10 +0000
commit5312f78dba5d61e668f38bcebae9926112b434d0 (patch)
treeb29a2f45a2601921ca3d0365c9adb6842432a493 /orkbasecxx/AudioTape.cpp
parent6e895bf3e556be3d30d85d4329b4bd79891faf79 (diff)
Added possibility to get Tape Message populated by the AudioTape class.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@408 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/AudioTape.cpp')
-rw-r--r--orkbasecxx/AudioTape.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp
index fedc828..7f0aadf 100644
--- a/orkbasecxx/AudioTape.cpp
+++ b/orkbasecxx/AudioTape.cpp
@@ -305,18 +305,7 @@ void AudioTape::GetMessage(MessageRef& msgRef)
TapeMsg* pTapeMsg = (TapeMsg*)msgRef.get();
if(captureEventRef->m_type == CaptureEvent::EtStop || captureEventRef->m_type == CaptureEvent::EtStart || captureEventRef->m_type == CaptureEvent::EtReady || captureEventRef->m_type == CaptureEvent::EtUpdate)
{
- pTapeMsg->m_recId = m_orkUid;
- pTapeMsg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension;
- pTapeMsg->m_stage = CaptureEvent::EventTypeToString(captureEventRef->m_type);
- pTapeMsg->m_capturePort = m_portId;
- pTapeMsg->m_localParty = m_localParty;
- pTapeMsg->m_localEntryPoint = m_localEntryPoint;
- pTapeMsg->m_remoteParty = m_remoteParty;
- pTapeMsg->m_direction = CaptureEvent::DirectionToString(m_direction);
- pTapeMsg->m_duration = m_duration;
- pTapeMsg->m_timestamp = m_beginDate;
- pTapeMsg->m_localIp = m_localIp;
- pTapeMsg->m_remoteIp = m_remoteIp;
+ PopulateTapeMessage(pTapeMsg, captureEventRef->m_type);
}
else
{
@@ -324,6 +313,28 @@ void AudioTape::GetMessage(MessageRef& msgRef)
}
}
+void AudioTape::GetDetails(TapeMsg* msg)
+{
+ PopulateTapeMessage(msg, CaptureEvent::EtStop);
+}
+
+
+void AudioTape::PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum eventType)
+{
+ msg->m_recId = m_orkUid;
+ msg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension;
+ msg->m_stage = CaptureEvent::EventTypeToString(eventType);
+ msg->m_capturePort = m_portId;
+ msg->m_localParty = m_localParty;
+ msg->m_localEntryPoint = m_localEntryPoint;
+ msg->m_remoteParty = m_remoteParty;
+ msg->m_direction = CaptureEvent::DirectionToString(m_direction);
+ msg->m_duration = m_duration;
+ msg->m_timestamp = m_beginDate;
+ msg->m_localIp = m_localIp;
+ msg->m_remoteIp = m_remoteIp;
+}
+
void AudioTape::GenerateCaptureFilePathAndIdentifier()
{
struct tm date = {0};