• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/avahi-0.6.25/avahi-python/avahi-discover/

Lines Matching refs:domain

60     def __init__(self, path="avahi-discover.glade", root="main_window", domain=None, **kwargs):
63 SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
69 (name,interface,protocol,stype,domain) = self.treemodel.get(iter,1,2,3,4,5)
74 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)
95 def service_resolved(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
96 print "Service data for service '%s' of type '%s' in domain '%s' on %i.%i:" % (name, stype, domain, interface, protocol)
100 self.update_label(interface, protocol, name, stype, domain, host, aprotocol, address, port, avahi.txt_array_to_string_array(txt))
115 def new_service(self, interface, protocol, name, stype, domain, flags):
116 print "Found service '%s' of type '%s' in domain '%s' on %i.%i." % (name, stype, domain, interface, protocol)
121 self.zc_ifaces[(interface,protocol)] = self.insert_row(self.treemodel, None, ifn, None,interface,protocol,None,domain)
122 if self.zc_domains.has_key((interface,protocol,domain)) == False:
123 self.zc_domains[(interface,protocol,domain)] = self.insert_row(self.treemodel, self.zc_ifaces[(interface,protocol)], domain,None,interface,protocol,None,domain)
124 if self.zc_types.has_key((interface,protocol,stype,domain)) == False:
125 thisDomain = self.zc_domains[(interface,protocol,domain)]
126 self.zc_types[(interface,protocol,stype,domain)] = self.insert_row(self.treemodel, thisDomain, self.lookup_type(stype), name, interface,None,None,None)
127 treeiter = self.insert_row(self.treemodel,self.zc_types[(interface,protocol,stype,domain)], name, name, interface,protocol,stype,domain)
128 self.services_browsed[(interface, protocol, name, stype, domain)] = treeiter
132 def remove_service(self, interface, protocol, name, stype, domain, flags):
133 print "Service '%s' of type '%s' in domain '%s' on %i.%i disappeared." % (name, stype, domain, interface, protocol)
135 treeiter=self.services_browsed[(interface, protocol, name, stype, domain)]
138 del self.services_browsed[(interface, protocol, name, stype, domain)]
140 treeiter=self.zc_types[(interface,protocol,stype,domain)]
143 del self.zc_types[(interface,protocol,stype,domain)]
145 treeiter=self.zc_domains[(interface,protocol,domain)]
148 del self.zc_domains[(interface,protocol,domain)]
155 def new_service_type(self, interface, protocol, stype, domain, flags):
158 # Are we already browsing this domain for this type?
159 if service_browsers.has_key((interface, protocol, stype, domain)):
162 print "Browsing for services of type '%s' in domain '%s' on %i.%i ..." % (stype, domain, interface, protocol)
164 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)
168 service_browsers[(interface, protocol, stype, domain)] = b
170 def browse_domain(self, interface, protocol, domain):
173 # Are we already browsing this domain?
174 if service_type_browsers.has_key((interface, protocol, domain)):
178 print "Browsing domain '%s' on %i.%i ..." % (domain, interface, protocol)
181 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)
189 service_type_browsers[(interface, protocol, domain)] = b
191 new_service_type(interface, protocol, stype, domain)
193 def new_domain(self,interface, protocol, domain, flags):
196 self.zc_ifaces[(interface,protocol)] = self.insert_row(self.treemodel, None, ifn,None,interface,protocol,None,domain)
197 if self.zc_domains.has_key((interface,protocol,domain)) == False:
198 self.zc_domains[(interface,protocol,domain)] = self.insert_row(self.treemodel, self.zc_ifaces[(interface,protocol)], domain,None,interface,protocol,None,domain)
199 if domain != "local":
200 self.browse_domain(interface, protocol, domain)
214 def update_label(self,interface, protocol, name, stype, domain, host, aprotocol, address, port, txt):
223 infos = "<b>Service Type:</b> %s\n<b>Service Name:</b> %s\n<b>Domain Name:</b> %s\n<b>Interface:</b> %s %s\n<b>Address:</b> %s/%s:%i\n%s" % (stype, name, domain, self.siocgifname(interface), self.protoname(protocol), host, address, port, txts.strip())
227 content, name, interface,protocol,stype,domain):
229 model.set(myiter,0,content,1,name,2,interface,3,protocol,4,stype,5,domain)
246 self.domain = None
256 if self.domain is None:
264 # Just browse the domain the user wants us to browse
265 self.browse_domain(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, domain)