-
Notifications
You must be signed in to change notification settings - Fork 14
Expose interfaces for introspection #12
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
base: master
Are you sure you want to change the base?
Conversation
When a server is running, make service interace introspectable. This would help clients which are not generated from this library to invoke methods
Hope you had nice weekend... any thoughts on PR? |
Hi @GaikwadPratik, sorry for the late response. Thanks I really did :) I don't quite understand the need of the feature, can you give an example? |
Hi @amenzhinsky, I believe you are familiar with dbus-inspect. In the attached video, first half is WITHOUT the PR while the second is WITH the PR. Screencast.from.04-20-2022.07-03-07.AM.mp4Basically, I'm writing a dbus-service(server instance) in Golang. When another developer wants to interact with the service, they WILL NOT know the interface(s) definition unless
As shown in the above video, introspection returns nothing without the changes in PR. |
I hope above video and explanation was sufficient. Basic answer is that you won't be able to introspect and by extension call dbus server unless you know the api correctly from somewhere. I can't explain or provide any example simple than this. P.S. I apologize for high resolution of the video. It would be better if you download it and then view it. |
replacing paths to own repo till amenzhinsky#12 is merged. Using replace directive in mod file is tedious because this will be indirect import and will vanish with every tidyness on mod. If and when amenzhinsky#12 is merged, this branch will be removed and original repo will be imported again. This branch helps exporting service to dbus for introspection
So, to generate server-side code you already have an introspection xml file, you can export |
That didn't help. Please see attached video. introspection.mp4The example in above video is from clien_server. Perhaps you can directly update that. P.S. please point out if I am doing any mistake in the above video |
You need to do something like this:
|
that's what this PR does. Just automatically instead of asking consumers to do it manually. Or am I missing something? |
would be great to see this PR merged.... |
@GaikwadPratik adding By trying to access the properties, I get following error: |
Though I am not sure why would we want to
Last time I tried this, it worked. How are you trying to access it? |
This extends @knightpp's idea and actually exposes interfaces for introspection when server is running.
Related to #8 and #9