Inheritance: BrowserBase, IDisposable
Ejemplo n.º 1
0
                public void Dispose ()
                {
			if (browser == null)
				return;

                        browser.Dispose ();
                        browser = null;
                }
Ejemplo n.º 2
0
    private static void OnServiceTypeAdded (object o, ServiceTypeInfoArgs args)
    {
        Console.WriteLine ("Got service type: " + args.ServiceType.ServiceType);
        ServiceBrowser sb = new ServiceBrowser (client, args.ServiceType.ServiceType, args.ServiceType.Domain);
        objects.Add (sb);

        sb.ServiceAdded += OnServiceAdded;
    }
Ejemplo n.º 3
0
        public void Browse(string regtype, string domain)
        {
            Dispose();

            client = new AV.Client();

            browser = new AV.ServiceBrowser(client, regtype, domain);
            browser.ServiceAdded += OnServiceAdded;
            browser.ServiceRemoved += OnServiceRemoved;
        }
Ejemplo n.º 4
0
        public void Browse(string regtype, string domain)
        {
            Dispose();

            client = new AV.Client();

            browser = new AV.ServiceBrowser(client, regtype, domain);
            browser.ServiceAdded   += OnServiceAdded;
            browser.ServiceRemoved += OnServiceRemoved;
        }
Ejemplo n.º 5
0
        public void Dispose()
        {
            if (client != null)
            {
                client.Dispose();
                client = null;
            }

            if (browser != null)
            {
                browser.Dispose();
                browser = null;
            }
        }
Ejemplo n.º 6
0
        public void Dispose()
        {
            if(client != null) {
                client.Dispose();
                client = null;
            }

            if(browser != null) {
                browser.Dispose();
                browser = null;
            }
        }
Ejemplo n.º 7
0
                public void Start ()
                {
                        browser = new ServiceBrowser (avahi_client, "_beagle._tcp");
                        browser.ServiceAdded += OnServiceAdded;
                        browser.ServiceRemoved += OnServiceRemoved;
		}
Ejemplo n.º 8
0
		public ICollection<NetworkService> GetServicesBlocking ()
		{
			object sync_lock = new object ();

			lock (sync_lock) {
				browser = new ServiceBrowser (avahi_client, "_beagle._tcp");
				browser.ServiceAdded += OnServiceAdded;
				browser.AllForNow += delegate (object o, EventArgs args) {
					Console.WriteLine ("All for now!");
					lock (sync_lock) {
						Monitor.Pulse (sync_lock);
					}
				};
				
				Monitor.Wait (sync_lock);

				Console.WriteLine ("Return!");
			}
			
			return services;
                }
Ejemplo n.º 9
0
 public void Start()
 {
     try {
         sb = new ServiceBrowser (client, "_ldap._tcp");
         sb.ServiceAdded += OnServiceAdded;
         sb.ServiceRemoved += OnServiceRemoved;
     } catch (Exception e) {
         Log.Debug (e);
     }
 }