-
Notifications
You must be signed in to change notification settings - Fork 1
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
Method calls! You can now do dbus method calls in the TUI! #8
Conversation
When hitting Enter on a method in the tree a popup will show. You can then enter each argument in text fields in this popup the arguments are then parsed into dbus types that are sent with the method call The return value is then put into the output text box. To do this a parser for a human readable format for dbus types was created parsers are created for a given type signature, and the then input is validated against that The parser is written using chumsky with subparsers for each dbus type.
@Troels51 Hey. Just FYI zbus 5.0 was release 2 weeks ago. It's probably a good idea to rebase this and merge it (if it works). |
Yep. I actually tried to do that yesterday and the update from git to 5.1 didn't go through cleanly. So I'll need to do a bit more work |
True but I'm sure it won't be a lot of work. The release notes should guide you: https://github.com/dbus2/zbus/releases/tag/zbus-5.0.0 I think mainly it's that |
Makes sense. While I have you. Now I am just using the zbus variant Display methods when showing method call outputs, but it doesn't line up with my input format. The main problem being the way zbus prints type information in some variant. Would you be open for a change to that? |
Yes please. Some example would help me understand what you're talking about. :) BTW, you don't need to rely on our Display impl. While in general, I'm open to suggestions on changes to the impls, IIRC some impls are kept exactly the same as that glib API for compatibility. But let's see an example, and I'll know if that's what you mean. |
I updated to zbus 5.1 now, if you want to see what an update looks like With regards to the Display impl, the picture attached shows an example. ObjectPath is being displayed with "objectpath" as a prefix. |
Right, thanks. So as you can see from the comment below that line, the impl is meant to resemble that of gvariant. The discussion is here about why this format was chosen: dbus2/zbus#366 . However, reading it again, I think the benefit of compatibility with gvariant doesn't seem very appealing to me anymore, especially given that I've mostly lost interest in gvariant format support in zbus. So yeah, we can reconsider this but first, can't you use |
Where i use it i just have a generic Value, not the specific ObjectPath type. |
Ah ok.
works. I mean, all you've to do is match the |
When hitting Enter on a method in the tree a popup will show. You can then enter each argument in text fields in this popup the arguments are then parsed into dbus types that are sent with the method call The return value is then put into the output text box.
To do this a parser for a human readable format for dbus types was created parsers are created for a given type signature, and the then input is validated against that The parser is written using chumsky with subparsers for each dbus type.
A couple of notes on things I want to improve.