Send correct informations to a http tracker.
[tairent.git] / src / main / mainthread.h
blobb7d63f2c5124d8dda18240a54a2e593c9d61d0dd
1 /***************************************************************************
2 * *
3 * Copyright (C) 2006 David Brodsky *
4 * *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License as *
7 * published by the Free Software Foundation and appearing *
8 * in the file LICENSE.GPL included in the packaging of this file. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
13 * General Public License for more details. *
14 * *
15 ***************************************************************************/
17 #ifndef _main_mainthread_h
18 #define _main_mainthread_h
20 #include <tairon/core/thread.h>
22 namespace Tairent
25 namespace Main
28 /** \brief Main applications thread.
30 class MainThread : public Tairon::Core::Thread
32 public:
33 /** Constructs a MainThread object.
35 MainThread();
37 /** Destroys the object.
39 virtual ~MainThread();
41 /** Called during clean-up stage that one operation has been completed.
43 void operationDone();
45 /** Called during clean-up stage to wait for one more operation to
46 * complete.
48 void operationInProgress();
50 /** Runs the main application loop.
52 virtual void *run();
54 /** Returns pointer to the instance of this class.
56 static MainThread *self() {
57 return mainThread;
60 private:
61 /** Pointer to the instance of this class.
63 static MainThread *mainThread;
66 }; // namespace Main
68 }; // namespace Tairent
70 #endif
72 // vim: ai sw=4 ts=4 noet fdm=marker