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 |
Definition at line 125 of file controlconnection.h.
enum ControlConnection::SendWaiter::SenderStatus [private] |
Status of the send waiter.
Definition at line 135 of file controlconnection.h.
ControlConnection::SendWaiter::SendWaiter | ( | ) | [inline] |
Default constructor.
Definition at line 128 of file controlconnection.h.
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().
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().