![]() |
CopperSpice DBUS
1.7.4
|
Contains the reply from sending an asynchronous message to a remote object. More...
Inherits QDBusPendingReplyAbstract.
Public Methods | |
QDBusPendingReply () | |
QDBusPendingReply (const QDBusMessage &message) | |
QDBusPendingReply (const QDBusPendingCall &call) | |
QDBusPendingReply (const QDBusPendingReply &other) | |
template<int Index> | |
const Select< Index >::Type | argumentAt () const |
QVariant | argumentAt (int index) const |
int | count () const |
QDBusPendingReply & | operator= (const QDBusMessage &message) |
QDBusPendingReply & | operator= (const QDBusPendingCall &call) |
QDBusPendingReply & | operator= (const QDBusPendingReply &other) |
Select< 0 >::Type | value () const |
The QDBusPendingReply class contains the reply from sending an asynchronous message to a remote object. The QDBusPendingReply is a templated class and the template parameters must correspond to the data types the remote object will return in the reply message. It is the programmers responsibility to ensure the template types match the expected reply message.
This class is similar to QDBusReply with two important differences as listed below.
|
inline |
(broom)
Creates an empty QDBusPendingReply object. Without assigning a QDBusPendingCall object to this reply, QDBusPendingReply can not do anything. All methods in this call will return their failure values.
|
inline |
(broom)
Copy constructs a new QDBusPendingReply from other. The new QDBusPendingReply object will share the same pending call reference. All copies share the same return values.
|
inline |
(broom)
Creates a QDBusPendingReply object that will take its contents from the call pending asynchronous call. This QDBusPendingReply object will share the same pending call reference as call.
|
inline |
(broom)
Creates a new QDBusPendingReply object which will
take its contents from the given message.
In this case, this object will be already in its finished state and the reply's contents will be accessible.
|
inline |
Returns the argument at position Index.
If the reply has not been received this method causes the calling thread to block until the reply is processed. If the reply does not contain an argument at position Index or if the reply was an error, this method returns a default constructed value. To reliably determine if the message contains an error call isError().
|
inline |
Returns the argument at position index.
If the reply does not have enough elements, the return value is undefined. You should verify that isFinished() and isValid() are both true before calling this method.
If the reply does not contain an argument at position index or if the reply was an error, this method returns an invalid QVariant. Since D-Bus messages can never contain invalid QVariants, this return can be used to detect an error condition.
|
inline |
Returns the number of arguments the reply should contain.
This number matches the number of template parameters in this class. If the reply arrives with a different number of arguments (or with different types), it will be transformed into an error reply indicating a bad signature.
|
inline |
Assigns the data members from the given message to the current QDBusPendingReply object. The current QDBusPendingReply object and the specified QDBusMessage object refer to the same data.
After the assignment the QDBusPendingReply object will be in its "finished" state and the message contents will be accessible.
|
inline |
Assigns the data members from the given call to the current QDBusPendingReply object. The current QDBusPendingReply object and the specified QDBusPendingCall object refer to the same data.
|
inline |
Copy assigns from other and returns a reference to this object.
|
inline |
Returns the first argument in this reply. This method is equivalent to calling argumentAt<0>().
If the reply has not arrived this method causes the calling thread to block until the reply is processed. If the reply is an error, a default constructed value is returned. To reliably determine if the message contains an error call isError().