Search code examples
c++qtdbusqtdbusnetworkmanager

Correspondence between dbus-send and QDBusAbstractInterface


What is the correspondence between parameters of dbus-send utitily and parameters of constructor and call* methods of QDBusAbstractInterface?

There is a plenty of examples (e.g. [1]) in the Internet of how to rule NetworkManager via DBus using dbus-send utility, but I can't infer how to transform them into Qt C++ code.


Solution

  • The question sounds a little too generic for any answer to be very useful for you but...

    dbus-send --dest=com.example.service \
              /service/path \
              com.example.interfacename.Method \
              int32:123
    

    should match

    QDBusInterface iface("com.example.Service",
                         "/service/path",
                         "com.example.interfacename");
    iface.call("Method", 123);