diff options
Diffstat (limited to 'avahi-daemon/dbus-test.py')
-rwxr-xr-x | avahi-daemon/dbus-test.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/avahi-daemon/dbus-test.py b/avahi-daemon/dbus-test.py index 30bd261..3cbe19c 100755 --- a/avahi-daemon/dbus-test.py +++ b/avahi-daemon/dbus-test.py @@ -52,6 +52,9 @@ stb.connect_to_signal('ItemRemove', lambda interface, protocol, type, domain: se def service_browser_callback(a, interface, protocol, name, type, domain): print "SERVICE_BROWSER: %s %i %i %s %s %s" % (a, interface, protocol, name, type, domain) + if a == "NEW": + print server.ResolveService(interface, protocol, name, type, domain, 0) + sb = dbus.Interface(bus.get_object("org.freedesktop.Avahi", server.ServiceBrowserNew(0, 0, "_http._tcp", "")), 'org.freedesktop.Avahi.ServiceBrowser') sb.connect_to_signal('ItemNew', lambda interface, protocol, name, type, domain: service_browser_callback("NEW", interface, protocol, name, type, domain)) sb.connect_to_signal('ItemRemove', lambda interface, protocol, name, type, domain: service_browser_callback("REMOVE", interface, protocol, name, type, domain)) |