-
Notifications
You must be signed in to change notification settings - Fork 222
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
Cannot seem to get Export to work. #184
Comments
Hi Folks, BTW: tried ...
inside my addSimpleMethod() function. While it modifies the introspection table, it fails to retain all but the last exported function. |
Yep it looks like we are lacking in official examples for this. I personally replace the default handler that works with export so I don't use it... There are some examples in the test code here: https://github.com/godbus/dbus/blob/master/export_test.go Hope this helps a bit. |
I've been perusing export_test for answers. The server example is what I initially followed (and is grossly misleading in the way it adds "Foo"). Speaking of which, how does one make a reference to a method? (i.e. map[string]interface{} for use with ExportMethodTable()?) I tried "p := ping("Pong")", followed by "Table["Ping"] = p", but this does not seem to work. I'm open to any suggestions on how to set up a server that can receive multiple methods. |
Well, now I've inverted what I had. Used ...
re: export_test.go, func TestExportWithMap() |
Found that in order for ExportWithMap() to work, all functions must return *dbus.Error" Example:
|
Here's what I have currently ...
This works perfectly for registering all the methods on the server, but once you get below "Try to introspect" line, things don't go so well. Is there a format that that I'm overlooking that would work for the dbus.Methods() call? |
Does anybody know if a solution has been found to this issue? |
Hi Folks,
I hate to do this again, but I can't seem to get the export function to work (outside of the "Foo" function under Server.go).
Here's what I have ...
Creates a structure to extend the Dbus connection with out interface and path ...
Created a function to populate it ...
Gave it a means of exporting to the bus ...
(output of the debug ...)
Implemented by (much in the same way as the "Foo" example) ....
Yet it never appears in the introspection, nor does it work.
a. What am I doing wrong?
b. Is there a mailing list or some other means of obtaining help on godbus?
(Yes I posted on go-nuts, no reply so far.)
I hate to open issues just to ask questions.
The text was updated successfully, but these errors were encountered: