diwic / dbus-rs

D-Bus binding for the Rust language
Other
591 stars 133 forks source link

register object of type X on dbus? #449

Closed kaii-lb closed 1 year ago

kaii-lb commented 1 year ago

say i have a struct which defines how an ObexAgent should work, i need to register this ObexAgent on dbus with a path so that dbus picks it up and the correct methods get called when a bluetooth transfer is inbound. How would i do this?

kaii-lb commented 1 year ago

something like this: https://dbus.freedesktop.org/doc/dbus-python/dbus.service.html#dbus.service.Object

diwic commented 1 year ago

Are you looking for porting something like this https://github.com/pauloborges/bluez/blob/master/test/simple-obex-agent to Rust?

For the server part (that listens to incoming method calls) you should look into dbus-crossroads.

kaii-lb commented 1 year ago

yes thats exactly what i was looking for actually, and dbus-crossroads solves my problem perfectly, thanks a lot!