diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-08-20 22:10:08 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-08-20 22:10:08 +0000 |
commit | eec7b116d5db1716810a3210b1e895be309cb39c (patch) | |
tree | 3ceb98b75328b8dcf4922cee6be1149f9ab8b5ed /orkbasecxx | |
parent | 6d612d25b50447faffd8a78404dc08f1b9d28151 (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')
-rw-r--r-- | orkbasecxx/AudioTape.cpp | 12 | ||||
-rw-r--r-- | orkbasecxx/AudioTape.h | 2 | ||||
-rw-r--r-- | orkbasecxx/Reporting.cpp | 2 | ||||
-rw-r--r-- | orkbasecxx/messages/TapeMsg.cpp | 3 | ||||
-rw-r--r-- | orkbasecxx/messages/TapeMsg.h | 2 |
5 files changed, 20 insertions, 1 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())); diff --git a/orkbasecxx/AudioTape.h b/orkbasecxx/AudioTape.h index 5b08182..14377b4 100644 --- a/orkbasecxx/AudioTape.h +++ b/orkbasecxx/AudioTape.h @@ -46,6 +46,7 @@ public: CStdString m_localIp; CStdString m_remoteIp; CStdString m_filename; + bool m_onDemand; }; class DLL_IMPORT_EXPORT_ORKBASE AudioTape @@ -96,6 +97,7 @@ public: CStdString m_nativeCallId; StateEnum m_state; int m_numErrors; + bool m_onDemand; TapeResponseRef m_tapeResponse; diff --git a/orkbasecxx/Reporting.cpp b/orkbasecxx/Reporting.cpp index a0664b6..30243e6 100644 --- a/orkbasecxx/Reporting.cpp +++ b/orkbasecxx/Reporting.cpp @@ -168,6 +168,7 @@ void Reporting::AddTapeMessage(MessageRef& messageRef) pRptTapeMsg->m_localIp = pTapeMsg->m_localIp; pRptTapeMsg->m_remoteIp = pTapeMsg->m_remoteIp; pRptTapeMsg->m_nativeCallId = pTapeMsg->m_nativeCallId; + pRptTapeMsg->m_onDemand = pTapeMsg->m_onDemand; // Copy the tags! std::copy(pTapeMsg->m_tags.begin(), pTapeMsg->m_tags.end(), std::inserter(pRptTapeMsg->m_tags, pRptTapeMsg->m_tags.begin())); @@ -207,6 +208,7 @@ void Reporting::AddTapeMessage(MessageRef& messageRef) pRptTapeMsg->m_localIp = pTapeMsg->m_localIp; pRptTapeMsg->m_remoteIp = pTapeMsg->m_remoteIp; pRptTapeMsg->m_nativeCallId = pTapeMsg->m_nativeCallId; + pRptTapeMsg->m_onDemand = pTapeMsg->m_onDemand; // Copy the tags! std::copy(pTapeMsg->m_tags.begin(), pTapeMsg->m_tags.end(), std::inserter(pRptTapeMsg->m_tags, pRptTapeMsg->m_tags.begin())); diff --git a/orkbasecxx/messages/TapeMsg.cpp b/orkbasecxx/messages/TapeMsg.cpp index f91d844..142e67b 100644 --- a/orkbasecxx/messages/TapeMsg.cpp +++ b/orkbasecxx/messages/TapeMsg.cpp @@ -50,6 +50,7 @@ void TapeMsg::Define(Serializer* s) s->StringValue(NATIVE_CALLID_PARAM, m_nativeCallId); s->CsvMapValue(TAGS_PARAM, m_tags); + s->BoolValue(ON_DEMAND_PARAM, m_onDemand); DefineMessage(s); } @@ -139,4 +140,4 @@ CStdString TapeTagMsg::GetClassName() ObjectRef TapeTagMsg::NewInstance() { return ObjectRef(new TapeTagMsg); -}
\ No newline at end of file +} diff --git a/orkbasecxx/messages/TapeMsg.h b/orkbasecxx/messages/TapeMsg.h index 017ab0e..89f90e0 100644 --- a/orkbasecxx/messages/TapeMsg.h +++ b/orkbasecxx/messages/TapeMsg.h @@ -33,6 +33,7 @@ #define REMOTE_MAC_PARAM "remotemac" #define NATIVE_CALLID_PARAM "nativecallid" #define TAGS_PARAM "tags" +#define ON_DEMAND_PARAM "ondemand" class DLL_IMPORT_EXPORT_ORKBASE TapeMsg : public SyncMessage { @@ -64,6 +65,7 @@ public: CStdString m_nativeCallId; std::map<CStdString, CStdString> m_tags; + bool m_onDemand; }; typedef boost::shared_ptr<TapeMsg> TapeMsgRef; |