Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

The server.go example is not properly introspectable #27

Open
ijanos opened this issue Oct 19, 2013 · 5 comments
Open

The server.go example is not properly introspectable #27

ijanos opened this issue Oct 19, 2013 · 5 comments
Assignees

Comments

@ijanos
Copy link

ijanos commented Oct 19, 2013

The Introspect method is only implemented on the /com/github/guelfey/Demo path so

dbus-send --session --print-reply --dest="com.github.guelfey.Demo" /com/github/guelfey/Demo org.freedesktop.DBus.Introspectable.Introspect

Returns the right xml while the following does not:

dbus-send --session --print-reply --dest="com.github.guelfey.Demo" / org.freedesktop.DBus.Introspectable.Introspect

The right output would be this:

<node>
   <node name="com"/>
</node>

calling /com should return the github node and so on.

I think there is no tool in the introspect package to generate these.

@guelfey
Copy link
Owner

guelfey commented Oct 21, 2013

The example is supposed to be just this - a simple, minimalist example. You're right, though, in that there should be something to make this easier for real cases. I'll leave this open as a reminder.

@ghost ghost assigned guelfey Oct 21, 2013
@hdonnay
Copy link

hdonnay commented Oct 22, 2013

could someone describe what the correct solution is?

is it to create the whole path as Nodes under a root Node?

@ijanos
Copy link
Author

ijanos commented Oct 22, 2013

I did this:
https://gist.github.com/ijanos/7099420

Now dbus introspect tools don't throw errors about non-existent objects.

@snyh
Copy link

snyh commented Nov 2, 2013

you can check this pull request #34
It will support d-feet perfectly. And is good at this moment.

this commit will handle this problem snyh@a1afa96

@rrerolle
Copy link

Hello, based on @snyh's work, I created a pull request that addresses simply the introspection of "sub-paths" of exported objects. You can look it up here: #53, please let me know what you think.

There are other interesting things in @snyh's pull request, such as helpers to automatically generate properties/signals introspection data, the same way the Methods helper does. I think these would be nice things to have, but this is another matter.

aulanov pushed a commit to aulanov/go.dbus that referenced this issue Jul 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants