blob: da21db6e2b3ce33eacd2235d502bdbec3be42850 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*************************************************
* Qt Thread Mutex Source File *
* (C) 1999-2008 The Botan Project *
*************************************************/
#include <botan/mux_qt.h>
#include <qmutex.h>
#if !defined(QT_THREAD_SUPPORT)
#error Your version of Qt does not support threads or mutexes
#endif
namespace Botan {
/*************************************************
* Qt Mutex Factory *
*************************************************/
Mutex* Qt_Mutex_Factory::make()
{
class Qt_Mutex : public Mutex
{
public:
void lock() { mutex.lock(); }
void unlock() { mutex.unlock(); }
private:
QMutex mutex;
};
return new Qt_Mutex();
}
}
|