diff options
author | Trent Lloyd <lathiat@bur.st> | 2005-10-15 18:49:33 +0000 |
---|---|---|
committer | Trent Lloyd <lathiat@bur.st> | 2005-10-15 18:49:33 +0000 |
commit | 1231d2977ff2f5a19b3d9d74271085633ef6e341 (patch) | |
tree | e8556fd7e6f430135afc0cde0c5d80311c985bab /avahi-utils | |
parent | 5e641df76abfd84b3ac9edd2a5e77603e81250ec (diff) |
* Fix avahi-utils to use new flags arguments
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@780 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-utils')
-rwxr-xr-x | avahi-utils/avahi-bookmarks.in | 4 | ||||
-rwxr-xr-x | avahi-utils/avahi-browse.in | 10 | ||||
-rwxr-xr-x | avahi-utils/avahi-discover.in | 8 | ||||
-rwxr-xr-x | avahi-utils/avahi-publish-address.in | 2 | ||||
-rwxr-xr-x | avahi-utils/avahi-publish-service.in | 2 | ||||
-rwxr-xr-x | avahi-utils/avahi-resolve-address.in | 2 | ||||
-rwxr-xr-x | avahi-utils/avahi-resolve-host-name.in | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/avahi-utils/avahi-bookmarks.in b/avahi-utils/avahi-bookmarks.in index df36f49..2de9186 100755 --- a/avahi-utils/avahi-bookmarks.in +++ b/avahi-utils/avahi-bookmarks.in @@ -71,7 +71,7 @@ class AvahiBookmarks(resource.Resource): global domain - browser = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, stype, domain, 0)), avahi.DBUS_INTERFACE_SERVICE_BROWSER) + browser = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, stype, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER) browser.connect_to_signal('ItemNew', self.new_service) browser.connect_to_signal('ItemRemove', self.remove_service) @@ -116,7 +116,7 @@ class AvahiBookmarks(resource.Resource): def new_service(self, interface, protocol, name, type, domain, flags): - interface, protocol, name, type, domain, host, aprotocol, address, port, txt, flags = self.server.ResolveService(interface, protocol, name, type, domain, avahi.PROTO_UNSPEC, 0) + interface, protocol, name, type, domain, host, aprotocol, address, port, txt, flags = self.server.ResolveService(interface, protocol, name, type, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0)) if use_host_names: h = host diff --git a/avahi-utils/avahi-browse.in b/avahi-utils/avahi-browse.in index 6ae00ba..1dd3376 100755 --- a/avahi-utils/avahi-browse.in +++ b/avahi-utils/avahi-browse.in @@ -101,7 +101,7 @@ def new_service(interface, protocol, name, stype, domain, flags): print "Found service '%s' of type '%s' (%s) in domain '%s' on %s.%i." % (name, stype, lookup_service_type(stype), domain, siocgifname(interface), protocol) # Asynchronous resolving - server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, 0, reply_handler=service_resolved, error_handler=print_error) + server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=service_resolved, error_handler=print_error) def remove_service(interface, protocol, name, stype, domain, flags): print "Service '%s' of type '%s' (%s) in domain '%s' on %s.%i disappeared." % (name, stype, lookup_service_type(stype), domain, siocgifname(interface), protocol) @@ -115,7 +115,7 @@ def new_service_type(interface, protocol, stype, domain, flags): print "Browsing for services of type '%s' (%s) in domain '%s' on %s.%i ..." % (stype, lookup_service_type(stype), domain, siocgifname(interface), protocol) - b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceBrowserNew(interface, protocol, stype, domain, 0)), avahi.DBUS_INTERFACE_SERVICE_BROWSER) + b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceBrowserNew(interface, protocol, stype, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER) b.connect_to_signal('ItemNew', new_service) b.connect_to_signal('ItemRemove', remove_service) @@ -131,12 +131,12 @@ def browse_domain(interface, protocol, domain): if stype is None: print "Browsing domain '%s' on %s.%i ..." % (domain, siocgifname(interface), protocol) - b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceTypeBrowserNew(interface, protocol, domain, 0)), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER) + b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceTypeBrowserNew(interface, protocol, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER) b.connect_to_signal('ItemNew', new_service_type) service_type_browsers[(interface, protocol, domain)] = b else: - new_service_type(interface, protocol, stype, domain, 0) + new_service_type(interface, protocol, stype, domain, dbus.UInt32(0)) def new_domain(interface, protocol, domain, flags): @@ -153,7 +153,7 @@ if domain is None: browse_domain(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "local") # Browse for other browsable domains - db = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.DomainBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "", avahi.DOMAIN_BROWSER_BROWSE, 0)), avahi.DBUS_INTERFACE_DOMAIN_BROWSER) + db = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.DomainBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "", avahi.DOMAIN_BROWSER_BROWSE, dbus.UInt32(0))), avahi.DBUS_INTERFACE_DOMAIN_BROWSER) db.connect_to_signal('ItemNew', new_domain) else: diff --git a/avahi-utils/avahi-discover.in b/avahi-utils/avahi-discover.in index 77ce72f..1083b6c 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, 0, reply_handler=self.service_resolved, error_handler=self.print_error) + self.server.ResolveService( int(interface), int(protocol), name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=self.service_resolved, error_handler=self.print_error) def protoname(self,protocol): @@ -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, 0)), avahi.DBUS_INTERFACE_SERVICE_BROWSER) + b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceBrowserNew(interface, protocol, stype, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER) b.connect_to_signal('ItemNew', self.new_service) b.connect_to_signal('ItemRemove', self.remove_service) @@ -157,7 +157,7 @@ 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, 0)), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER) + b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceTypeBrowserNew(interface, protocol, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER) b.connect_to_signal('ItemNew', self.new_service_type) service_type_browsers[(interface, protocol, domain)] = b @@ -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, 0)), 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, dbus.UInt32(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 diff --git a/avahi-utils/avahi-publish-address.in b/avahi-utils/avahi-publish-address.in index 2806049..4ffebd7 100755 --- a/avahi-utils/avahi-publish-address.in +++ b/avahi-utils/avahi-publish-address.in @@ -59,7 +59,7 @@ def add_address(): print "Adding address '%s' for '%s' ..." % (name, address) group = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.EntryGroupNew()), avahi.DBUS_INTERFACE_ENTRY_GROUP) group.connect_to_signal('StateChanged', entry_group_state_changed) - group.AddAddress(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, name, address) + group.AddAddress(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, dbus.UInt32(0), name, address) group.Commit() def entry_group_state_changed(state): diff --git a/avahi-utils/avahi-publish-service.in b/avahi-utils/avahi-publish-service.in index 41cc5d4..3f40fd0 100755 --- a/avahi-utils/avahi-publish-service.in +++ b/avahi-utils/avahi-publish-service.in @@ -89,7 +89,7 @@ def add_service(): print "Adding service '%s' of type '%s' ..." % (name, stype) - group.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, name, stype, domain, host, dbus.UInt16(port), avahi.string_array_to_txt_array(txt)) + group.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, dbus.UInt32(0), name, stype, domain, host, dbus.UInt16(port), avahi.string_array_to_txt_array(txt)) group.Commit() def entry_group_state_changed(state): diff --git a/avahi-utils/avahi-resolve-address.in b/avahi-utils/avahi-resolve-address.in index a645bbd..0c39b4a 100755 --- a/avahi-utils/avahi-resolve-address.in +++ b/avahi-utils/avahi-resolve-address.in @@ -44,7 +44,7 @@ ret = 0 for a in sys.argv[1:]: try: - r = server.ResolveAddress(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, a, 0) + r = server.ResolveAddress(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, a, dbus.UInt32(0)) print r[3], r[4] except dbus.DBusException, e: print "Resolving '%s' failed: %s" % (a, str(e)) diff --git a/avahi-utils/avahi-resolve-host-name.in b/avahi-utils/avahi-resolve-host-name.in index 3cc97b0..0d7be28 100755 --- a/avahi-utils/avahi-resolve-host-name.in +++ b/avahi-utils/avahi-resolve-host-name.in @@ -44,7 +44,7 @@ ret = 0 for name in sys.argv[1:]: try: - r = server.ResolveHostName(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, name, avahi.PROTO_UNSPEC, 0) + r = server.ResolveHostName(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, name, avahi.PROTO_UNSPEC, dbus.UInt32(0)) print r[2], r[4] except dbus.DBusException, e: print "Resolving '%s' failed: %s" % (name, str(e)) |