QDBusPendingCall Class Reference |
QDBusPendingCall ( const QDBusPendingCall & other ) | |
~QDBusPendingCall () | |
QDBusPendingCall & | operator= ( const QDBusPendingCall & other ) |
QDBusPendingCall | fromCompletedCall ( const QDBusMessage & msg ) |
QDBusPendingCall | fromError ( const QDBusError & error ) |
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.
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, and QDBusAbstractInterface::asyncCall().
Creates a copy of the other pending asynchronous call. Note that both objects will refer to the same pending call.
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.
Creates a QDBusPendingCall object based on the message msg. The message must be of type QDBusMessage::ErrorMessage or QDBusMessage::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.
This function was introduced in Qt 4.6.
See also fromError().
Creates a QDBusPendingCall object based on the error condition error. The resulting pending call object will be in the "finished" state and QDBusPendingReply::isError() will return true.
This function was introduced in Qt 4.6.
See also fromCompletedCall().
Creates a copy of the other pending asynchronous call and drops the reference to the previously-referenced call. 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.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6-snapshot | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com