1 #ifndef _threadcontroller_
\r
2 #define _threadcontroller_
\r
5 #include "pthreadwrapper/thread.h"
\r
6 #include "pthreadwrapper/singleton.h"
\r
8 class ThreadController:public PThread::Singleton<ThreadController>,public ILogger
\r
11 ThreadController():m_freenetthread(NULL),m_httpthread(NULL),m_nntpthread(NULL) {}
\r
12 ~ThreadController();
\r
14 void StartThreads();
\r
15 void ShutdownThreads();
\r
16 void RestartThreads();
\r
18 void StartFreenetThread();
\r
19 void StartHTTPThread();
\r
20 void StartNNTPThread();
\r
22 void ShutdownFreenetThread();
\r
23 void ShutdownHTTPThread();
\r
24 void ShutdownNNTPThread();
\r
29 bool m_startfreenet;
\r
33 PThread::Thread *m_freenetthread;
\r
34 PThread::Thread *m_httpthread;
\r
35 PThread::Thread *m_nntpthread;
\r
39 #endif // _threadcontroller_
\r