ControlConnection::SendWaiter Class Reference

List of all members.

Public Member Functions

 SendWaiter ()
void setResult (bool success, QString errmsg=QString())
bool getResult (QString *errmsg=0)

Private Types

enum  SenderStatus { Waiting, Failed, Success }

Private Attributes

enum
ControlConnection::SendWaiter::SenderStatus 
_status
QMutex _mutex
QWaitCondition _waitCond
QString _errmsg


Detailed Description

Object used to wait for the result of a send operation.

Definition at line 125 of file controlconnection.h.


Member Enumeration Documentation

enum ControlConnection::SendWaiter::SenderStatus [private]

Status of the send waiter.

Enumerator:
Waiting 
Failed 
Success 

Definition at line 135 of file controlconnection.h.


Constructor & Destructor Documentation

ControlConnection::SendWaiter::SendWaiter (  )  [inline]

Default constructor.

Definition at line 128 of file controlconnection.h.

References _status, and Waiting.


Member Function Documentation

void ControlConnection::SendWaiter::setResult ( bool  success,
QString  errmsg = QString() 
)

Sets the result of the send operation.

Definition at line 362 of file controlconnection.cpp.

References _errmsg, _mutex, _status, _waitCond, Failed, and Success.

Referenced by ControlConnection::eventFilter().

bool ControlConnection::SendWaiter::getResult ( QString *  errmsg = 0  ) 

Waits for and gets the result of the send operation.

Definition at line 373 of file controlconnection.cpp.

References _errmsg, _mutex, _status, _waitCond, Success, and Waiting.

Referenced by ControlConnection::send().


Member Data Documentation

enum ControlConnection::SendWaiter::SenderStatus ControlConnection::SendWaiter::_status [private]

Status of the send waiter.

Referenced by getResult(), SendWaiter(), and setResult().

QMutex ControlConnection::SendWaiter::_mutex [private]

Mutex around the wait condition.

Definition at line 136 of file controlconnection.h.

Referenced by getResult(), and setResult().

QWaitCondition ControlConnection::SendWaiter::_waitCond [private]

Waits for the send to complete.

Definition at line 137 of file controlconnection.h.

Referenced by getResult(), and setResult().

QString ControlConnection::SendWaiter::_errmsg [private]

Error message if the send fails.

Definition at line 138 of file controlconnection.h.

Referenced by getResult(), and setResult().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 15:49:29 2007 for Vidalia by  doxygen 1.5.3