diff options
author | Henri Herscher <henri@oreka.org> | 2007-02-09 02:21:10 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2007-02-09 02:21:10 +0000 |
commit | 5312f78dba5d61e668f38bcebae9926112b434d0 (patch) | |
tree | b29a2f45a2601921ca3d0365c9adb6842432a493 /orkbasecxx | |
parent | 6e895bf3e556be3d30d85d4329b4bd79891faf79 (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')
-rw-r--r-- | orkbasecxx/AudioTape.cpp | 35 | ||||
-rw-r--r-- | orkbasecxx/AudioTape.h | 2 |
2 files changed, 25 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}; diff --git a/orkbasecxx/AudioTape.h b/orkbasecxx/AudioTape.h index 341797f..6690316 100644 --- a/orkbasecxx/AudioTape.h +++ b/orkbasecxx/AudioTape.h @@ -77,6 +77,7 @@ public: CStdString GetExtension(); AudioFileRef GetAudioFileRef(); bool IsReadyForBatchProcessing(); + void GetDetails(TapeMsg* msg); CStdString m_portId; @@ -98,6 +99,7 @@ private: void GenerateCaptureFilePathAndIdentifier(); void GenerateFinalFilePathAndIdentifier(); void PreventFileIdentifierCollision(CStdString& path, CStdString& identifier, CStdString& extension); + void PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum eventType); CStdString m_filePath; CStdString m_fileIdentifier; |