- def new_service(self, interface, protocol, name, type, domain):
- print "Found service '%s' of type '%s' in domain '%s' on %i.%i." % (name, type, domain, interface, protocol)
- if self.zc_types.has_key((interface,protocol,type,domain)) == False:
- self.zc_types[(interface,protocol,type,domain)] = self.insert_row(self.treemodel,self.zc_domains[(interface,protocol,domain)], type, name, interface,None,None,None)
- treeiter = self.insert_row(self.treemodel,self.zc_types[(interface,protocol,type,domain)], name, name, interface,protocol,type,domain)
- self.services_browsed[(interface, protocol, name, type, domain)] = treeiter
+ 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)
+ if self.zc_domains.has_key((interface,protocol,domain)) == False:
+ self.zc_domains[(interface,protocol,domain)] = self.insert_row(self.treemodel, self.zc_ifaces[(interface,protocol)], domain,None,interface,protocol,None,domain)
+ if self.zc_types.has_key((interface,protocol,stype,domain)) == False:
+ thisDomain = self.zc_domains[(interface,protocol,domain)]
+ self.zc_types[(interface,protocol,stype,domain)] = self.insert_row(self.treemodel, thisDomain, self.lookup_type(stype), name, interface,None,None,None)
+ treeiter = self.insert_row(self.treemodel,self.zc_types[(interface,protocol,stype,domain)], name, name, interface,protocol,stype,domain)
+ self.services_browsed[(interface, protocol, name, stype, domain)] = treeiter
+ # expand the tree of this path
+ self.tree_view.expand_to_path(self.treemodel.get_path(treeiter))