-
-
Notifications
You must be signed in to change notification settings - Fork 133
gio: Add DBusObjectManagerClient #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gio: Add DBusObjectManagerClient #1829
Conversation
66daac1 to
9585bff
Compare
|
I noticed that the implementation of GDBusObjectManagerClient uses a mutex internally, so I marked it as Sadly the docs don't mention the MT safety like they do for other types such as
|
|
You can update the gir submodule & regen, that should get rid of some of the manual code i hope :) |
|
Wohoo that worked like a charm ✨ |
| flags: DBusObjectManagerClientFlags, | ||
| name: &str, | ||
| object_path: &str, | ||
| get_proxy_type_func: Option<DBusProxyTypeFn>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not useful API. You can't construct a None very easily. It would be better to have two variants of this function, one with callback and one without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no, None is easy because you have it already defined as Box<dyn>. But the case where a callback is provided is not very convenient now as it requires wrapping in Some() and Box::new().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sdroege
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me otherwise. Do you also want to provide a small example making use of this?
Yes, my plan was to make |
Sadly all constructors are generated manually:
new/new_futureandnew_for_bus/new_for_bus_futurewere not generated at all by gir (the*_futureversions were generated, but I don't know how to set only the callback version to manually generated)new_syncandnew_for_bus_syncwere generated mostly fine. I only had to fix how the cancellable param is passed to ffi:This looks like a bug in gir because for other methods with a cancellable the.map(...)part is added just fine.