summaryrefslogtreecommitdiffstats
path: root/avahi-utils/avahi-discover.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-09-25 20:15:46 +0000
committerLennart Poettering <lennart@poettering.net>2005-09-25 20:15:46 +0000
commitc202afe723757ecd3a21a508eaa2eccf2d72b45d (patch)
treeb3bc35fd8a70ec41aa00c078d2cf8277759e13b7 /avahi-utils/avahi-discover.in
parent7da8bb6e9a1990413c943dcfd54c71d8744fcb00 (diff)
update python programs to new DBUS API
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@611 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-utils/avahi-discover.in')
-rwxr-xr-xavahi-utils/avahi-discover.in18
1 files changed, 9 insertions, 9 deletions
diff --git a/avahi-utils/avahi-discover.in b/avahi-utils/avahi-discover.in
index 04d133c..77ce72f 100755
--- a/avahi-utils/avahi-discover.in
+++ b/avahi-utils/avahi-discover.in
@@ -52,7 +52,7 @@ class Main_window(SimpleGladeApp):
self.info_label.set_markup("<i>No service currently selected.</i>")
return
#Asynchronous resolving
- self.server.ResolveService( int(interface), int(protocol), name, stype, domain, avahi.PROTO_UNSPEC, reply_handler=self.service_resolved, error_handler=self.print_error)
+ self.server.ResolveService( int(interface), int(protocol), name, stype, domain, avahi.PROTO_UNSPEC, 0, reply_handler=self.service_resolved, error_handler=self.print_error)
def protoname(self,protocol):
@@ -68,7 +68,7 @@ class Main_window(SimpleGladeApp):
else:
return self.server.GetNetworkInterfaceNameByIndex(interface)
- def service_resolved(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt):
+ def service_resolved(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
print "Service data for service '%s' of type '%s' in domain '%s' on %i.%i:" % (name, stype, domain, interface, protocol)
print "\tHost %s (%s), port %i, TXT data: %s" % (host, address, port, str(avahi.txt_array_to_string_array(txt)))
@@ -93,7 +93,7 @@ class Main_window(SimpleGladeApp):
except KeyError:
return stype
- def new_service(self, interface, protocol, name, stype, domain):
+ def new_service(self, interface, protocol, name, stype, domain, flags):
print "Found service '%s' of type '%s' in domain '%s' on %i.%i." % (name, stype, domain, interface, protocol)
if self.zc_ifaces.has_key((interface,protocol)) == False:
self.zc_ifaces[(interface,protocol)] = self.insert_row(self.treemodel, None, str(self.siocgifname(interface))+" "+str(self.protoname(protocol)),None,interface,protocol,None,domain)
@@ -108,7 +108,7 @@ class Main_window(SimpleGladeApp):
self.tree_view.expand_to_path(self.treemodel.get_path(treeiter))
- def remove_service(self, interface, protocol, name, stype, domain):
+ def remove_service(self, interface, protocol, name, stype, domain, flags):
print "Service '%s' of type '%s' in domain '%s' on %i.%i disappeared." % (name, stype, domain, interface, protocol)
self.info_label.set_markup("")
treeiter=self.services_browsed[(interface, protocol, name, stype, domain)]
@@ -132,7 +132,7 @@ class Main_window(SimpleGladeApp):
del self.zc_ifaces[(interface,protocol)]
- def new_service_type(self, interface, protocol, stype, domain):
+ def new_service_type(self, interface, protocol, stype, domain, flags):
global service_browsers
# Are we already browsing this domain for this type?
@@ -141,7 +141,7 @@ class Main_window(SimpleGladeApp):
print "Browsing for services of type '%s' in domain '%s' on %i.%i ..." % (stype, domain, interface, protocol)
- b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(interface, protocol, stype, domain)), avahi.DBUS_INTERFACE_SERVICE_BROWSER)
+ b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(interface, protocol, stype, domain, 0)), avahi.DBUS_INTERFACE_SERVICE_BROWSER)
b.connect_to_signal('ItemNew', self.new_service)
b.connect_to_signal('ItemRemove', self.remove_service)
@@ -157,14 +157,14 @@ class Main_window(SimpleGladeApp):
if self.stype is None:
print "Browsing domain '%s' on %i.%i ..." % (domain, interface, protocol)
- b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceTypeBrowserNew(interface, protocol, domain)), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER)
+ b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceTypeBrowserNew(interface, protocol, domain, 0)), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER)
b.connect_to_signal('ItemNew', self.new_service_type)
service_type_browsers[(interface, protocol, domain)] = b
else:
new_service_type(interface, protocol, stype, domain)
- def new_domain(self,interface, protocol, domain):
+ def new_domain(self,interface, protocol, domain, flags):
if self.zc_ifaces.has_key((interface,protocol)) == False:
self.zc_ifaces[(interface,protocol)] = self.insert_row(self.treemodel, None, str(self.siocgifname(interface))+" "+str(self.protoname(protocol)),None,interface,protocol,None,domain)
if self.zc_domains.has_key((interface,protocol,domain)) == False:
@@ -211,7 +211,7 @@ class Main_window(SimpleGladeApp):
self.browse_domain(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "local")
# Browse for other browsable domains
- db = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.DomainBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "", avahi.DOMAIN_BROWSER_BROWSE)), avahi.DBUS_INTERFACE_DOMAIN_BROWSER)
+ db = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.DomainBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "", avahi.DOMAIN_BROWSER_BROWSE, 0)), avahi.DBUS_INTERFACE_DOMAIN_BROWSER)
db.connect_to_signal('ItemNew', self.new_domain)
else:
# Just browse the domain the user wants us to browse