Question

How does one register an object, interface, and methods on the session bus using the D-Bus low-level public API?

I've read many things about DBus and the best resource that I could find for doing what I currently want was Using the DBUS C API which describes how to request a name on the bus (among other things) and I've done that successfully but I'm unable to call a method on it and when I view it with D-Feet, there are no objects listed under the name I created. This leads me to think that there are additional steps to register an object, interface, and methods that aren't in the aforementioned guide (unless I missed something even after reading it a dozen times).

I'm confident in my ability to call methods using the low-level public API because I've successfully used it to call DBus methods exposed by off-the-shelf applications.

Please note that I am not interested in any DBus Bindings. Thanks

Was it helpful?

Solution

The answer was in the question I think. I believe that the reason that I couldn't call the method that I created was that I didn't have a leading slash in my path argument of the method call DBus message. As in:

/com/example/whatever correct

com/example/whatever incorrect

The guide I referenced in the question has the minimum requirements to do it. I believe that the reason that I couldn't see the method in D-feet is because it relies on introspection method calls, which I did not implement.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top