summaryrefslogtreecommitdiff
path: root/orkbasecxx/Reporting.h
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2007-12-02 00:09:47 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2007-12-02 00:09:47 +0000
commit292e5f35006a577f601e00bbbcddef17315c7b55 (patch)
tree9b261b170b89c6e1817db01bda7257dc905353d2 /orkbasecxx/Reporting.h
parent90c2a7f79d23b6daf595152a9039685d78f05815 (diff)
Added support for reporting to multiple orktrack servers - the config.xml parameter TrackerHostname has been changed to accept a comma-separated list of tracker servers
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@514 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/Reporting.h')
-rw-r--r--orkbasecxx/Reporting.h46
1 files changed, 40 insertions, 6 deletions
diff --git a/orkbasecxx/Reporting.h b/orkbasecxx/Reporting.h
index 7f7778d..5446467 100644
--- a/orkbasecxx/Reporting.h
+++ b/orkbasecxx/Reporting.h
@@ -18,6 +18,37 @@
#include "TapeProcessor.h"
#include "AudioTape.h"
+
+struct ReportingThreadInfo
+{
+ char m_serverHostname[256];
+ int m_serverPort;
+ int m_numTapesToSkip;
+ bool m_queueFullError;
+ char m_threadId[256];
+ ThreadSafeQueue<AudioTapeRef> m_audioTapeQueue;
+ ACE_Thread_Mutex m_mutex;
+};
+typedef boost::shared_ptr<ReportingThreadInfo> ReportingThreadInfoRef;
+
+
+class ReportingThread
+{
+public:
+ ReportingThread();
+ void Run();
+
+ CStdString m_serverHostname;
+ int m_serverPort;
+
+ CStdString m_threadId;
+ ReportingThreadInfoRef m_myInfo;
+private:
+ bool IsSkip();
+};
+
+//=======================================================
+
class DLL_IMPORT_EXPORT_ORKBASE Reporting : public TapeProcessor
{
public:
@@ -27,22 +58,23 @@ public:
CStdString __CDECL__ GetName();
TapeProcessorRef __CDECL__ Instanciate();
void __CDECL__ AddAudioTape(AudioTapeRef& audioTapeRef);
- void __CDECL__ SkipTapes(int number);
+ void __CDECL__ SkipTapes(int number, CStdString trackingServer="");
//static Reporting* GetInstance();
static void ThreadHandler(void *args);
+ static void ReportingThreadEntryPoint(void *args);
private:
Reporting();
- bool IsSkip();
+ //bool IsSkip();
//static Reporting m_reportingSingleton;
static TapeProcessorRef m_singleton;
- ThreadSafeQueue<AudioTapeRef> m_audioTapeQueue;
- bool m_queueFullError;
- int numTapesToSkip;
- ACE_Thread_Mutex m_mutex;
+ //ThreadSafeQueue<AudioTapeRef> m_audioTapeQueue;
+ //bool m_queueFullError;
+ //int numTapesToSkip;
+ //ACE_Thread_Mutex m_mutex;
};
class DLL_IMPORT_EXPORT_ORKBASE ReportingSkipTapeMsg : public SyncMessage
@@ -58,7 +90,9 @@ public:
ObjectRef Process();
int m_number;
+ CStdString m_tracker;
};
+
#endif