]> git.meshlink.io Git - catta/commitdiff
* Fix avahi-utils to use new flags arguments
authorTrent Lloyd <lathiat@bur.st>
Sat, 15 Oct 2005 18:49:33 +0000 (18:49 +0000)
committerTrent Lloyd <lathiat@bur.st>
Sat, 15 Oct 2005 18:49:33 +0000 (18:49 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@780 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-utils/avahi-bookmarks.in
avahi-utils/avahi-browse.in
avahi-utils/avahi-discover.in
avahi-utils/avahi-publish-address.in
avahi-utils/avahi-publish-service.in
avahi-utils/avahi-resolve-address.in
avahi-utils/avahi-resolve-host-name.in

index df36f49a254f2464f6bdedff18526b184dd399b2..2de9186f535d271024e614fba8c2dfb6bc261944 100755 (executable)
@@ -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
index 6ae00ba50e1eacfda0191a6a523f07b917307317..1dd3376b663b5652fa6c09a37481dbd09968bcaa 100755 (executable)
@@ -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:
index 77ce72f07cc206dc8811b8d45e4c0218fd31f35f..1083b6ca9d66bffc6abc756c6c42d7eea1cf0580 100755 (executable)
@@ -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
index 2806049fa7c7f899677617977a004f2007a3168a..4ffebd72941446a4feaea53c3e3ec23d3e7c8262 100755 (executable)
@@ -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):
index 41cc5d49bc224b6c968a62053879b373210ce798..3f40fd0c2f9331119e62d11efdc6e2fd9585eacd 100755 (executable)
@@ -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):
index a645bbd0352c541e3b329832cc9c09670f7e9b6c..0c39b4abc036467d9b2c88a5dba3a422b55db14f 100755 (executable)
@@ -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))
index 3cc97b08d0ca97df4197199dbcc0ac68263d1f83..0d7be287874f2c4dc877edf9c09ad50c25cdc5a2 100755 (executable)
@@ -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))