![]() |
CopperSpice DBUS
1.7.4
|
Contains the reply returned by sending a message to a remote object. More...
Public Methods | |
QDBusReply (const QDBusError &error=QDBusError ()) | |
QDBusReply (const QDBusMessage &reply) | |
QDBusReply (const QDBusPendingCall &pcall) | |
QDBusReply (const QDBusPendingReply< T > &reply) | |
const QDBusError & | error () |
const QDBusError & | error () const |
bool | isValid () const |
operator Type () const | |
QDBusReply & | operator= (const QDBusError &error) |
QDBusReply & | operator= (const QDBusMessage &message) |
QDBusReply & | operator= (const QDBusPendingCall &pcall) |
QDBusReply & | operator= (const QDBusReply &other) |
Type | value () const |
The QDBusReply class contains the reply returned by sending a message to a remote object. The reply is either the first return value or an error code. These values can be used by classes which inherit from QDBusInterface.
The folllowing example shows how to use the QDBusReply class.
|
inline |
(broom)
Constructs a new QDBusReply object from the given reply, extracting the first return value from it if it is a success reply.
|
inline |
(broom)
Constructs a new QDBusReply object from the asynchronous pending pcall. If the call is not finished yet, QDBusReply will call QDBusPendingCall::waitForFinished(), which is a blocking operation.
If the return types patch, QDBusReply will extract the first return argument from the reply.
|
inline |
Constructs a new QDBusReply object from the pending reply message.
|
inline |
Constructs an error reply from the D-Bus error code given by error.
|
inline |
(broom)
|
inline |
(broom)
Returns the error code returned from the call to the remote object.
If the remote call did not return an error then the QDBusError object that is returned will not be a valid error code (QDBusError::isValid() will return false).
|
inline |
Returns true if no error occurred otherwise, returns false.
|
inline |
Returns the same as value(). This method is not available if the remote call returns "void".
|
inline |
(broom)
Sets this object to contain the error code given by error. You can later access it with error().
|
inline |
(broom)
Makes this object contain the reply specified by the given message. If message is an error message, this function will copy the error code and message into this object
If message is a standard reply message and contains at least one parameter, it will be copied into this object, as long as it is of the correct type. If it is not of the same type as this QDBusError object, this function will instead set an error code indicating a type mismatch.
|
inline |
(broom)
Makes this object contain the reply specified by the pending asynchronous call pcall. If the call is not finished yet, this function will call QDBusPendingCall::waitForFinished() to block until the reply arrives.
If pcall finishes with an error message, this function will copy the error code and message into this object
If pcall finished with a standard reply message and contains at least one parameter, it will be copied into this object, as long as it is of the correct type. If it's not of the same type as this QDBusError object, this function will instead set an error code indicating a type mismatch.
|
inline |
Copy assigns from other and returns a reference to this object.
|
inline |
Returns the remote function's calls return value. If the remote call returned with an error, the return value of this function is undefined and may be undistinguishable from a valid return value.
This method is not available if the remote call returns "void".