Vidalia 0.2.15
|
Public Member Functions | |
ReceiveWaiter () | |
bool | getResult (ControlReply *reply, QString *errmsg=0) |
void | setResult (bool success, const ControlReply &reply, const QString &errmsg=QString()) |
Private Types | |
enum | ReceiveStatus { Waiting, Failed, Success } |
Private Attributes | |
enum ControlConnection::ReceiveWaiter::ReceiveStatus | _status |
ControlReply | _reply |
QMutex | _mutex |
QWaitCondition | _waitCond |
QString | _errmsg |
Private class used to wait for a response to a control command.
Definition at line 111 of file ControlConnection.h.
enum ControlConnection::ReceiveWaiter::ReceiveStatus [private] |
Status of the receive waiter.
Definition at line 122 of file ControlConnection.h.
ControlConnection::ReceiveWaiter::ReceiveWaiter | ( | ) | [inline] |
Default constructor.
Definition at line 114 of file ControlConnection.h.
bool ControlConnection::ReceiveWaiter::getResult | ( | ControlReply * | reply, |
QString * | errmsg = 0 |
||
) |
Waits for and gets the reply from a control command.
Definition at line 379 of file ControlConnection.cpp.
References _errmsg, _mutex, _reply, _status, _waitCond, Success, and Waiting.
Referenced by ControlConnection::send().
void ControlConnection::ReceiveWaiter::setResult | ( | bool | success, |
const ControlReply & | reply, | ||
const QString & | errmsg = QString() |
||
) |
Sets the result and reply from a control command.
Definition at line 401 of file ControlConnection.cpp.
References ControlConnection::_status.
Referenced by ControlConnection::onReadyRead(), and ControlConnection::run().
QString ControlConnection::ReceiveWaiter::_errmsg [private] |
Error message if the reply fails.
Definition at line 126 of file ControlConnection.h.
Referenced by getResult().
QMutex ControlConnection::ReceiveWaiter::_mutex [private] |
Mutex around the wait condition.
Definition at line 124 of file ControlConnection.h.
Referenced by getResult().
Reply to a previous command.
Definition at line 123 of file ControlConnection.h.
Referenced by getResult().
enum ControlConnection::ReceiveWaiter::ReceiveStatus ControlConnection::ReceiveWaiter::_status [private] |
Referenced by getResult(), and ReceiveWaiter().
QWaitCondition ControlConnection::ReceiveWaiter::_waitCond [private] |
Waits for a control rpely.
Definition at line 125 of file ControlConnection.h.
Referenced by getResult().