示例#1
0
        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();
        }
示例#2
0
        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;
            }
        }
示例#3
0
                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;
			}
                }
示例#4
0
                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 ();
                }
示例#5
0
                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);
		}
示例#6
0
 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);
 }
示例#7
0
                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 ();
                }