From 6d301a8dadf98464952912db2646e68df15b347f Mon Sep 17 00:00:00 2001 From: Henri Herscher Date: Thu, 2 Mar 2006 16:11:12 +0000 Subject: OrkTrack can now ask for tape deletion git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@189 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkaudio/Reporting.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'orkaudio/Reporting.cpp') diff --git a/orkaudio/Reporting.cpp b/orkaudio/Reporting.cpp index 799a3e0..308b58c 100644 --- a/orkaudio/Reporting.cpp +++ b/orkaudio/Reporting.cpp @@ -15,8 +15,10 @@ #include "Reporting.h" #include "LogManager.h" #include "messages/Message.h" +#include "messages/TapeMsg.h" #include "OrkClient.h" #include "Daemon.h" +#include "BatchProcessing.h" Reporting Reporting::m_reportingSingleton; @@ -67,16 +69,22 @@ void Reporting::ThreadHandler(void *args) LOG4CXX_INFO(LOG.reportingLog, msgAsSingleLineString); OrkHttpSingleLineClient c; - SimpleResponseMsg srm; + TapeResponse tr; bool success = false; bool firstError = true; while (!success) { - if (c.Execute((SyncMessage&)(*msgRef.get()), srm, CONFIG.m_trackerHostname, CONFIG.m_trackerTcpPort, CONFIG.m_trackerServicename, CONFIG.m_clientTimeout)) + if (c.Execute((SyncMessage&)(*msgRef.get()), tr, CONFIG.m_trackerHostname, CONFIG.m_trackerTcpPort, CONFIG.m_trackerServicename, CONFIG.m_clientTimeout)) { success = true; + if(tr.m_deleteTape) + { + LOG4CXX_INFO(LOG.reportingLog, "Registered tape for removal: " + audioTapeRef->GetIdentifier()); + CStdString tapeFilename = audioTapeRef->GetFilename(); + BatchProcessing::GetInstance()->TapeDropRegistration(tapeFilename); + } } else { -- cgit v1.2.3