Logo Search packages:      
Sourcecode: kdbus version File versions  Download package

QDBusMessage QDBusProxy::sendWithReply ( const QString &  method,
const QValueList< QVariant > &  params,
QDBusError error = 0 
) const

Sends a method call to the peer object and waits for the reply.

This is roughly equivalent to calling a C++ method on a local object.

method the name of the method to invoke
params the method parameters. Use an empty list if the method does not require parameters
error optional parameter to get any error directly
a QDBusMessage containing any return values of the invoked method. Will be an invalid message if an error occurs. The error can be accessed through the optional paramater error or through lastError()
See also:



Method and signal names

Definition at line 148 of file qdbusproxy.cpp.

References QDBusMessage::methodCall().

    if (!d->canSend || method.isEmpty() || !d->connection.isConnected())
        return QDBusMessage();

    QDBusMessage message = QDBusMessage::methodCall(d->service, d->path,
                                                    d->interface, method);
    message += params;

    QDBusMessage reply = d->connection.sendWithReply(message, &d->error);

    if (error)
        *error = d->error;

    return reply;

Generated by  Doxygen 1.6.0   Back to index