private void OnServiceResolved(object o, ServiceInfoArgs args) { NetworkService service = ParseServiceInfo(args.Service); services.Add(service); AvahiEventArgs event_args = new AvahiEventArgs(service); if (HostFound != null) { HostFound(null, event_args); } ((ServiceResolver)o).Dispose(); }
private void OnServiceRemoved(object sender, ServiceInfoArgs args) { foreach (NetworkService service in services) { if (service.Name != args.Service.Name) { continue; } services.Remove(service); AvahiEventArgs event_args = new AvahiEventArgs(service); if (HostRemoved != null) { HostRemoved(this, event_args); } return; } }
private void OnServiceRemoved (object sender, ServiceInfoArgs args) { foreach (NetworkService service in services) { if (service.Name != args.Service.Name) continue; services.Remove (service); AvahiEventArgs event_args = new AvahiEventArgs (service); if (HostRemoved != null) HostRemoved (this, event_args); return; } }
private void OnServiceResolved (object o, ServiceInfoArgs args) { NetworkService service = ParseServiceInfo (args.Service); services.Add (service); AvahiEventArgs event_args = new AvahiEventArgs (service); if (HostFound != null) HostFound (null, event_args); ((ServiceResolver)o).Dispose (); }
private void OnUnknownHostFound (object sender, AvahiEventArgs args) { NotificationMessage m = new NotificationMessage (); m.Pixbuf = WidgetFu.LoadThemeIcon ("network-workgroup", 48); m.Title = Catalog.GetString ("There are computers near you running Beagle"); m.Message = Catalog.GetString ("You can select to search other computers from the \"Search\" menu."); m.AddAction ("Configure", OnNetworkConfigure); notification_area.Display (m); }
private void OnHostRemoved (object sender, AvahiEventArgs args) { find_node = args.Address.Host; found_iter = TreeIter.Zero; store.Foreach (new TreeModelForeachFunc (ForeachFindNode)); store.Remove (ref found_iter); }
private void OnHostFound (object sender, AvahiEventArgs args) { store.AppendValues (args.Name, (args.Service.IsProtected == true) ? locked_icon : unlocked_icon, args.Service.IsProtected, args.Address.Host, args.Address.Port); icon_view.QueueDraw (); }