QDBusPendingCall¶
The QDBusPendingCall
class refers to one pending asynchronous call. More…
Inherited by: QDBusPendingCallWatcher
Synopsis¶
Functions¶
def
error
()def
isError
()def
isFinished
()def
isValid
()def
reply
()def
swap
(other)def
waitForFinished
()
Static functions¶
def
fromCompletedCall
(message)def
fromError
(error)
Detailed Description¶
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 waitForFinished()
method which will suspend the execution of the program until the reply has arrived.
Note
If you create a copy of a QDBusPendingCall
object, all information will be shared among the many copies. Therefore, QDBusPendingCall
is an explicitly-shared object and does not provide a method of detaching the copies (since they refer to the same pending call)
See also
QDBusPendingReply
QDBusPendingCallWatcher
- class PySide6.QtDBus.QDBusPendingCall(other)¶
- Parameters
other –
PySide6.QtDBus.QDBusPendingCall
Creates a copy of the other
pending asynchronous call. Note that both objects will refer to the same pending call.
- PySide6.QtDBus.QDBusPendingCall.error()¶
- Return type
- static PySide6.QtDBus.QDBusPendingCall.fromCompletedCall(message)¶
- Parameters
message –
PySide6.QtDBus.QDBusMessage
- Return type
Creates a QDBusPendingCall
object based on the message msg
. The message must be of type ErrorMessage
or ReplyMessage
(that is, a message that is typical of a completed call).
This function is useful for code that requires simulating a pending call, but that has already finished.
See also
- static PySide6.QtDBus.QDBusPendingCall.fromError(error)¶
- Parameters
error –
PySide6.QtDBus.QDBusError
- Return type
Creates a QDBusPendingCall
object based on the error condition error
. The resulting pending call object will be in the “finished” state and QDBusPendingReply
<Types…>::isError() will return true.
See also
- PySide6.QtDBus.QDBusPendingCall.isError()¶
- Return type
bool
- PySide6.QtDBus.QDBusPendingCall.isFinished()¶
- Return type
bool
- PySide6.QtDBus.QDBusPendingCall.isValid()¶
- Return type
bool
- PySide6.QtDBus.QDBusPendingCall.reply()¶
- Return type
- PySide6.QtDBus.QDBusPendingCall.swap(other)¶
- Parameters
other –
PySide6.QtDBus.QDBusPendingCall
Swaps this pending call instance with other
. This function is very fast and never fails.
- PySide6.QtDBus.QDBusPendingCall.waitForFinished()¶
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.