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

bool QDBusConnection::send ( const QDBusMessage message  )  const

Sends a message over the bus.

Sends a message composed through the QDBusMessage API to the bus. This is the main method for service objects (see QDBusObjectBase) to send replies and errors for method calls they accepted or for sending DBus signals.

for doing method calls it is more convenient to use QDBusProxy, see QDBusProxy::send()
message the message to send
true if sending succeeded, false if the connection is not connected, if the message lacks information about the recepient or if sending fails a at a lower level in the communication stack
See also:

Definition at line 240 of file qdbusconnection.cpp.

References QDBusMessage::toDBusMessage().

    if (!d || !d->connection)
        return false;

    DBusMessage *msg = message.toDBusMessage();
    if (!msg)
        return false;

    bool isOk = dbus_connection_send(d->connection, msg, 0);
    return isOk;

Generated by  Doxygen 1.6.0   Back to index