SendCommandEvent::SendWaiter Class Reference

#include <sendcommandevent.h>

List of all members.

Public Types

 Waiting
 Failed
 Success
enum  SenderStatus { Waiting, Failed, Success }

Public Member Functions

 SendWaiter ()
void setResult (bool success, const QString &errmsg=QString())
bool getResult (QString *errmsg=0)
SenderStatus status ()

Public Attributes

enum SendCommandEvent::SendWaiter::SenderStatus _status

Private Attributes

QMutex _mutex
QWaitCondition _waitCond
QString _errmsg


Detailed Description

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

Definition at line 32 of file sendcommandevent.h.


Member Enumeration Documentation

enum SendCommandEvent::SendWaiter::SenderStatus

Status of the send SendWaiter.

Enumerator:
Waiting 
Failed 
Success 

Definition at line 35 of file sendcommandevent.h.


Constructor & Destructor Documentation

SendCommandEvent::SendWaiter::SendWaiter (  )  [inline]

Default constructor.

Definition at line 37 of file sendcommandevent.h.

References _status, and Waiting.


Member Function Documentation

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

Waits for and returns the result of the send operation.

Definition at line 43 of file sendcommandevent.cpp.

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

Referenced by ControlConnection::send().

void SendCommandEvent::SendWaiter::setResult ( bool  success,
const QString &  errmsg = QString() 
)

Sets the result of the send operation.

Definition at line 32 of file sendcommandevent.cpp.

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

Referenced by ControlConnection::run().

SendCommandEvent::SendWaiter::SenderStatus SendCommandEvent::SendWaiter::status (  ) 

Returns the SendWaiter's current SenderStatus value.

Definition at line 63 of file sendcommandevent.cpp.

References _mutex, and _status.

Referenced by ControlConnection::run().


Member Data Documentation

QString SendCommandEvent::SendWaiter::_errmsg [private]

Error message if the send fails.

Definition at line 47 of file sendcommandevent.h.

Referenced by getResult(), and setResult().

QMutex SendCommandEvent::SendWaiter::_mutex [private]

Mutex around the wait condition.

Definition at line 45 of file sendcommandevent.h.

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

enum SendCommandEvent::SendWaiter::SenderStatus SendCommandEvent::SendWaiter::_status

Status of the send SendWaiter.

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

QWaitCondition SendCommandEvent::SendWaiter::_waitCond [private]

Waits for the send to complete.

Definition at line 46 of file sendcommandevent.h.

Referenced by getResult(), and setResult().


The documentation for this class was generated from the following files:
Generated on Tue Jul 7 16:58:27 2009 for Vidalia by  doxygen 1.4.7