![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtDBus More...
#include <qdbuspendingcall.h>
Public Member Functions | |
QDBusPendingCall (const QDBusPendingCall &other) | |
Creates a copy of the other pending asynchronous call. | |
QDBusPendingCall (QDBusPendingCall &&other) noexcept=default | |
~QDBusPendingCall () | |
Destroys this copy of the QDBusPendingCall object. | |
QDBusPendingCall & | operator= (QDBusPendingCall &&other) noexcept |
QDBusPendingCall & | operator= (const QDBusPendingCall &other) |
Creates a copy of the other pending asynchronous call and drops the reference to the previously-referenced call. | |
void | swap (QDBusPendingCall &other) noexcept |
bool | isFinished () const |
void | waitForFinished () |
bool | isError () const |
bool | isValid () const |
QDBusError | error () const |
QDBusMessage | reply () const |
Static Public Member Functions | |
static QDBusPendingCall | fromError (const QDBusError &error) |
static QDBusPendingCall | fromCompletedCall (const QDBusMessage &message) |
Protected Member Functions | |
QDBusPendingCall (QDBusPendingCallPrivate *dd) |
Protected Attributes | |
QExplicitlySharedDataPointer< QDBusPendingCallPrivate > | d |
Friends | |
class | QDBusPendingCallPrivate |
class | QDBusPendingCallWatcher |
class | QDBusConnection |
class | ::tst_QDBusPendingReply |
\inmodule QtDBus
The QDBusPendingCall class refers to one pending asynchronous call.
A QDBusPendingCall object is a reference to a method call that was sent over D-Bus without waiting for a reply. QDBusPendingCall is an opaque type, meant to be used as a handle for a pending reply.
In most programs, the QDBusPendingCall class will not be used directly. It can be safely replaced with the template-based QDBusPendingReply, in order to access the contents of the reply or wait for it to be complete.
The QDBusPendingCallWatcher class allows one to connect to a signal that will indicate when the reply has arrived or if the call has timed out. It also provides the QDBusPendingCallWatcher::waitForFinished() method which will suspend the execution of the program until the reply has arrived.
Definition at line 28 of file qdbuspendingcall.h.
QDBusPendingCall::QDBusPendingCall | ( | const QDBusPendingCall & | other | ) |
Creates a copy of the other pending asynchronous call.
Note that both objects will refer to the same pending call.
Definition at line 243 of file qdbuspendingcall.cpp.
|
defaultnoexcept |
Moves other into this object.
partially-formed
QDBusPendingCall::~QDBusPendingCall | ( | ) |
Destroys this copy of the QDBusPendingCall object.
If this copy is also the last copy of a pending asynchronous call, the call will be canceled and no further notifications will be received. There will be no way of accessing the reply's contents when it arrives.
Definition at line 266 of file qdbuspendingcall.cpp.
|
protected |
Definition at line 251 of file qdbuspendingcall.cpp.
QDBusError QDBusPendingCall::error | ( | ) | const |
Definition at line 391 of file qdbuspendingcall.cpp.
|
static |
This function is useful for code that requires simulating a pending call, but that has already finished.
Definition at line 476 of file qdbuspendingcall.cpp.
|
static |
Definition at line 459 of file qdbuspendingcall.cpp.
bool QDBusPendingCall::isError | ( | ) | const |
Definition at line 375 of file qdbuspendingcall.cpp.
bool QDBusPendingCall::isFinished | ( | ) | const |
Definition at line 335 of file qdbuspendingcall.cpp.
bool QDBusPendingCall::isValid | ( | ) | const |
Definition at line 358 of file qdbuspendingcall.cpp.
QDBusPendingCall & QDBusPendingCall::operator= | ( | const QDBusPendingCall & | other | ) |
Creates a copy of the other pending asynchronous call and drops the reference to the previously-referenced call.
\fn QDBusPendingCall &QDBusPendingCall::operator=(QDBusPendingCall &&other) Move-assigns \a other into this QDBusPendingCall.
! [partially-formed]
Note that both objects will refer to the same pending call after this function.
If this object contained the last reference of a pending asynchronous call, the call will be canceled and no further notifications will be received. There will be no way of accessing the reply's contents when it arrives.
Definition at line 295 of file qdbuspendingcall.cpp.
|
inlinenoexcept |
Definition at line 34 of file qdbuspendingcall.h.
QDBusMessage QDBusPendingCall::reply | ( | ) | const |
Definition at line 415 of file qdbuspendingcall.cpp.
|
inlinenoexcept |
Definition at line 37 of file qdbuspendingcall.h.
void QDBusPendingCall::waitForFinished | ( | ) |
Definition at line 344 of file qdbuspendingcall.cpp.
|
friend |
Definition at line 64 of file qdbuspendingcall.h.
|
friend |
Definition at line 57 of file qdbuspendingcall.h.
|
friend |
Definition at line 55 of file qdbuspendingcall.h.
|
friend |
Definition at line 56 of file qdbuspendingcall.h.
|
protected |
Definition at line 54 of file qdbuspendingcall.h.