Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ThreadUtil::Channel Class Reference

#include </home/clem/local/src/opie/noncore/multimedia/opieplayer2/threadutil.h>

Inheritance diagram for ThreadUtil::Channel:

Inheritance graph
[legend]
Collaboration diagram for ThreadUtil::Channel:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SendType { OneWay, WaitForReply }

Public Member Functions

 Channel (QObject *parent=0, const char *name=0)
virtual ~Channel ()
void send (ChannelMessage *message, SendType type)

Protected Member Functions

virtual void receiveMessage (ChannelMessage *message, SendType type)=0

Private Types

typedef QValueList< MsgEnvelopeMsgEnvelopeList

Private Slots

void deliver ()

Private Member Functions

void deliverOne (const MsgEnvelope &envelope)

Private Attributes

OnewayNotifier m_notifier
MsgEnvelopeList m_pendingMessages
Mutex m_pendingMessagesGuard
Private * d

Classes

struct  MsgEnvelope

Member Typedef Documentation

typedef QValueList<MsgEnvelope> ThreadUtil::Channel::MsgEnvelopeList [private]
 

Definition at line 190 of file threadutil.h.


Member Enumeration Documentation

enum ThreadUtil::Channel::SendType
 

Enumeration values:
OneWay 
WaitForReply 

Definition at line 163 of file threadutil.h.


Constructor & Destructor Documentation

Channel::Channel QObject *  parent = 0,
const char *  name = 0
 

Definition at line 311 of file threadutil.cpp.

References deliver(), and m_notifier.

Channel::~Channel  )  [virtual]
 

Definition at line 318 of file threadutil.cpp.

References d.


Member Function Documentation

void Channel::deliver  )  [private, slot]
 

Definition at line 351 of file threadutil.cpp.

References QValueList< T >::begin(), deliverOne(), QValueList< T >::first(), QValueList< T >::isEmpty(), ThreadUtil::Mutex::lock(), m_pendingMessages, m_pendingMessagesGuard, QValueList< T >::remove(), and ThreadUtil::Mutex::unlock().

Referenced by Channel(), and send().

void Channel::deliverOne const MsgEnvelope envelope  )  [private]
 

Definition at line 366 of file threadutil.cpp.

References assert, ThreadUtil::Mutex::lock(), ThreadUtil::ChannelMessage::m_guard, ThreadUtil::ChannelMessage::m_inEventHandler, ThreadUtil::Channel::MsgEnvelope::msg, receiveMessage(), ThreadUtil::Channel::MsgEnvelope::type, and WaitForReply.

Referenced by deliver().

virtual void ThreadUtil::Channel::receiveMessage ChannelMessage message,
SendType  type
[protected, pure virtual]
 

Referenced by deliverOne().

void Channel::send ChannelMessage message,
SendType  type
 

Definition at line 323 of file threadutil.cpp.

References assert, d, deliver(), ThreadUtil::Mutex::lock(), ThreadUtil::ChannelMessage::m_condition, ThreadUtil::ChannelMessage::m_guard, ThreadUtil::ChannelMessage::m_isCall, m_notifier, m_pendingMessages, m_pendingMessagesGuard, ThreadUtil::OnewayNotifier::notify(), ThreadUtil::Mutex::unlock(), ThreadUtil::WaitCondition::wait(), and WaitForReply.

Referenced by XINE::Lib::handleXineEvent().


Member Data Documentation

Private* ThreadUtil::Channel::d [private]
 

Definition at line 195 of file threadutil.h.

Referenced by send(), and ~Channel().

OnewayNotifier ThreadUtil::Channel::m_notifier [private]
 

Definition at line 176 of file threadutil.h.

Referenced by Channel(), and send().

MsgEnvelopeList ThreadUtil::Channel::m_pendingMessages [private]
 

Definition at line 192 of file threadutil.h.

Referenced by deliver(), and send().

Mutex ThreadUtil::Channel::m_pendingMessagesGuard [private]
 

Definition at line 193 of file threadutil.h.

Referenced by deliver(), and send().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:03:58 2005 for OPIE by  doxygen 1.4.2