author | zecke <zecke> | 2004-09-24 15:09:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-24 15:09:56 (UTC) |
commit | 8e903cd3ea735adf066e156462602987691a4c69 (patch) (side-by-side diff) | |
tree | b05fe7cc6d46cbacdc47fe3f0411100076bc8a52 /noncore/multimedia/opieplayer2/threadutil.h | |
parent | 478b2ead47a09956cadfacb8f469fb2fdee5531c (diff) | |
download | opie-8e903cd3ea735adf066e156462602987691a4c69.zip opie-8e903cd3ea735adf066e156462602987691a4c69.tar.gz opie-8e903cd3ea735adf066e156462602987691a4c69.tar.bz2 |
-Emit Progress from the xine Engine to Global::statusMessage
-Change ThreadUtil to pass data and const char* among threads
Diffstat (limited to 'noncore/multimedia/opieplayer2/threadutil.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.h b/noncore/multimedia/opieplayer2/threadutil.h index 2e83d3a..f97a18b 100644 --- a/noncore/multimedia/opieplayer2/threadutil.h +++ b/noncore/multimedia/opieplayer2/threadutil.h @@ -112,60 +112,64 @@ namespace ThreadUtil OnewayNotifier(); ~OnewayNotifier(); void notify(); signals: void awake(); private slots: void wakeUp(); private: int m_readFd; int m_writeFd; QSocketNotifier *m_notifier; }; class Channel; class ChannelMessage { friend class Channel; public: - ChannelMessage( int type = -1 ); + ChannelMessage( int type = -1, int data = -1, const char* msg = 0 ); virtual ~ChannelMessage(); int type() const { return m_type; } + int data() const { return m_data; } + const char* msg()const { return m_msg; } void reply(); private: ChannelMessage( const ChannelMessage & ); ChannelMessage &operator=( const ChannelMessage ); int m_type; + int m_data; + const char *m_msg; bool m_isCall : 1; bool m_replied : 1; bool m_inEventHandler : 1; Mutex m_guard; WaitCondition m_condition; }; class Channel : public QObject { Q_OBJECT public: enum SendType { OneWay, WaitForReply }; Channel( QObject *parent = 0, const char *name = 0 ); virtual ~Channel(); void send( ChannelMessage *message, SendType type ); protected: virtual void receiveMessage( ChannelMessage *message, SendType type ) = 0; private slots: void deliver(); private: |