author | simon <simon> | 2002-12-11 11:19:31 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 11:19:31 (UTC) |
commit | 03535484e54b2b2311d9d44670b417e2b81ae63b (patch) (unidiff) | |
tree | e0f0e51469f54dcba338432baee622c58038b310 | |
parent | dd7fcdf1589c8513055f6475d3a1f33075d971d8 (diff) | |
download | opie-03535484e54b2b2311d9d44670b417e2b81ae63b.zip opie-03535484e54b2b2311d9d44670b417e2b81ae63b.tar.gz opie-03535484e54b2b2311d9d44670b417e2b81ae63b.tar.bz2 |
- step three to make it compile with gcc2
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.h b/noncore/multimedia/opieplayer2/threadutil.h index 2fd0c68..1411535 100644 --- a/noncore/multimedia/opieplayer2/threadutil.h +++ b/noncore/multimedia/opieplayer2/threadutil.h | |||
@@ -40,96 +40,97 @@ namespace ThreadUtil | |||
40 | void unlock(); | 40 | void unlock(); |
41 | bool tryLock(); | 41 | bool tryLock(); |
42 | bool isLocked(); | 42 | bool isLocked(); |
43 | 43 | ||
44 | private: | 44 | private: |
45 | struct Data; | 45 | struct Data; |
46 | Data *d; | 46 | Data *d; |
47 | 47 | ||
48 | Mutex( const Mutex & ); | 48 | Mutex( const Mutex & ); |
49 | Mutex &operator=( const Mutex & ); | 49 | Mutex &operator=( const Mutex & ); |
50 | }; | 50 | }; |
51 | 51 | ||
52 | class AutoLock | 52 | class AutoLock |
53 | { | 53 | { |
54 | public: | 54 | public: |
55 | AutoLock( Mutex &mutex ) : m_mutex( mutex ) { m_mutex.lock(); } | 55 | AutoLock( Mutex &mutex ) : m_mutex( mutex ) { m_mutex.lock(); } |
56 | ~AutoLock() { m_mutex.unlock(); } | 56 | ~AutoLock() { m_mutex.unlock(); } |
57 | 57 | ||
58 | Mutex *operator &() const { return &m_mutex; } | 58 | Mutex *operator &() const { return &m_mutex; } |
59 | 59 | ||
60 | private: | 60 | private: |
61 | Mutex &m_mutex; | 61 | Mutex &m_mutex; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | class WaitCondition | 64 | class WaitCondition |
65 | { | 65 | { |
66 | public: | 66 | public: |
67 | WaitCondition(); | 67 | WaitCondition(); |
68 | ~WaitCondition(); | 68 | ~WaitCondition(); |
69 | 69 | ||
70 | bool wait(); | 70 | bool wait(); |
71 | bool wait( Mutex &mutex ); | 71 | bool wait( Mutex &mutex ); |
72 | 72 | ||
73 | void wakeOne(); | 73 | void wakeOne(); |
74 | void wakeAll(); | 74 | void wakeAll(); |
75 | 75 | ||
76 | private: | 76 | private: |
77 | struct Data; | 77 | struct Data; |
78 | Data *d; | 78 | Data *d; |
79 | 79 | ||
80 | WaitCondition( const WaitCondition & ); | 80 | WaitCondition( const WaitCondition & ); |
81 | WaitCondition &operator=( const WaitCondition & ); | 81 | WaitCondition &operator=( const WaitCondition & ); |
82 | }; | 82 | }; |
83 | 83 | ||
84 | class Thread | 84 | class Thread |
85 | { | 85 | { |
86 | public: | 86 | public: |
87 | struct Data; | 87 | struct Data; |
88 | friend struct Data; | ||
88 | 89 | ||
89 | Thread(); | 90 | Thread(); |
90 | virtual ~Thread(); | 91 | virtual ~Thread(); |
91 | 92 | ||
92 | void start(); | 93 | void start(); |
93 | void terminate(); | 94 | void terminate(); |
94 | 95 | ||
95 | bool wait(); | 96 | bool wait(); |
96 | 97 | ||
97 | bool isRunning() const; | 98 | bool isRunning() const; |
98 | 99 | ||
99 | static void exit(); | 100 | static void exit(); |
100 | protected: | 101 | protected: |
101 | virtual void run() = 0; | 102 | virtual void run() = 0; |
102 | 103 | ||
103 | private: | 104 | private: |
104 | Data *d; | 105 | Data *d; |
105 | }; | 106 | }; |
106 | 107 | ||
107 | class OnewayNotifier : public QObject | 108 | class OnewayNotifier : public QObject |
108 | { | 109 | { |
109 | Q_OBJECT | 110 | Q_OBJECT |
110 | public: | 111 | public: |
111 | OnewayNotifier(); | 112 | OnewayNotifier(); |
112 | ~OnewayNotifier(); | 113 | ~OnewayNotifier(); |
113 | 114 | ||
114 | void notify(); | 115 | void notify(); |
115 | 116 | ||
116 | signals: | 117 | signals: |
117 | void awake(); | 118 | void awake(); |
118 | 119 | ||
119 | private slots: | 120 | private slots: |
120 | void wakeUp(); | 121 | void wakeUp(); |
121 | 122 | ||
122 | private: | 123 | private: |
123 | int m_readFd; | 124 | int m_readFd; |
124 | int m_writeFd; | 125 | int m_writeFd; |
125 | QSocketNotifier *m_notifier; | 126 | QSocketNotifier *m_notifier; |
126 | }; | 127 | }; |
127 | 128 | ||
128 | 129 | ||
129 | class Channel; | 130 | class Channel; |
130 | 131 | ||
131 | class ChannelMessage | 132 | class ChannelMessage |
132 | { | 133 | { |
133 | friend class Channel; | 134 | friend class Channel; |
134 | public: | 135 | public: |
135 | ChannelMessage( int type = -1 ); | 136 | ChannelMessage( int type = -1 ); |