2015-01-02 9 views
0

dbus-send를 사용하여 DBus 연결 이름의 전체 객체 트리를 수집 할 수 있습니까?dbus-send를 사용하는 DBus 내성 객체 트리

현재 'org.freedesktop.DBus.Introspectable.Introspect'메소드를 지정하고 원하는 경로에 '/'를 처음으로 여러 번 호출하면 내부 노드를 검색하고 그 새 전화. 예를 들어

:

$ dbus-send --session --print-reply --reply-timeout=2000 --type=method_call --dest=org.gnome.Bluetooth.applet/org.freedesktop.DBus.Introspectable.Introspect 

gives nodes Factory and org. So I proceed with the calls: 

$ dbus-send --session --print-reply --reply-timeout=2000 --type=method_call --dest=org.gnome.Bluetooth.applet /Factory org.freedesktop.DBus.Introspectable.Introspect 

$ dbus-send --session --print-reply --reply-timeout=2000 --type=method_call --dest=org.gnome.Bluetooth.applet /org org.freedesktop.DBus.Introspectable.Introspect 

and so on... 

나는 한 번에 전체 트리를 가져 오지 싶습니다.

나는 d-feet와 같은 도구를 알고 있지만 cli 인터페이스가 필요하고 dbus-send는 매우 편리 할 것입니다.

+0

필자의 필요에 따라 "원샷 솔루션"을 발견했습니다. gdbus introspect --session --dest org.gnome.Bluetooth.applet --object-path/- 재귀 - xml – Cristiano

답변

1

아니요, 불가능합니다. 버스에 모든 서비스 이름을 나열하도록 요청할 수 있지만 모든 인터페이스를 묻는 방법은 없으므로 대개 두 가지 시나리오가 있습니다. 1) 인터페이스 이름을 알고 사용합니다. 2) /으로 시작하여 Introspect() 응답을 기반으로 재귀 적으로 처리합니다. D-feet does (2)