Наследование: IDisposable
 public ServiceResolver(Client client, string name, string type, string domain)
     : this(client, -1,
                                                                                         Protocol.Unspecified,
                                                                                         name, type, domain,
                                                                                         Protocol.Unspecified,
                                                                                         LookupFlags.None)
 {
 }
 public ServiceResolver(Client client, ServiceInfo service)
     : this(client, service.NetworkInterface,
                                                                     service.Protocol, service.Name,
                                                                     service.ServiceType, service.Domain,
                                                                     Protocol.Unspecified,
                                                                     GetLookupFlags (service.Flags))
 {
 }
Пример #3
0
 public ServiceFinder()
 {
     try {
         client = new Client();
     } catch (Exception e) {
         Log.Info ("Unable to enable avahi support");
         Log.Debug (e);
     }
 }
 public AddressResolver(Client client, int iface, Protocol proto, IPAddress address, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.address = address;
     this.flags = flags;
     cb = OnAddressResolverCallback;
 }
 public ServiceTypeBrowser(Client client, int iface, Protocol proto, string domain, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.domain = domain;
     this.flags = flags;
     cb = OnServiceTypeBrowserCallback;
 }
Пример #6
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;
        }
Пример #7
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;
        }
 public HostNameResolver(Client client, int iface, Protocol proto, string hostname,
                          Protocol aproto, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.hostname = hostname;
     this.aproto = aproto;
     this.flags = flags;
     cb = OnHostNameResolverCallback;
 }
Пример #9
0
        public EntryGroup(Client client)
        {
            this.client = client;
            cb = OnEntryGroupCallback;

            lock (client) {
                handle = avahi_entry_group_new (client.Handle, cb, IntPtr.Zero);
                if (handle == IntPtr.Zero)
                    client.ThrowError ();
            }
        }
Пример #10
0
        public void Dispose()
        {
            if(client != null) {
                client.Dispose();
                client = null;
            }

            if(browser != null) {
                browser.Dispose();
                browser = null;
            }
        }
 public ServiceResolver(Client client, int iface, Protocol proto, string name,
                         string type, string domain, Protocol aproto, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.name = name;
     this.type = type;
     this.domain = domain;
     this.aproto = aproto;
     this.flags = flags;
     cb = OnServiceResolverCallback;
 }
Пример #12
0
        public void Dispose()
        {
            if (client != null)
            {
                client.Dispose();
                client = null;
            }

            if (browser != null)
            {
                browser.Dispose();
                browser = null;
            }
        }
Пример #13
0
                public void Dispose ()
                {
			Logger.Log.Debug ("Zeroconf: Service stopped...");

			if (entry_group != null) {
				entry_group.Dispose ();
				entry_group = null;
			}

			if (client != null) {
				client.Dispose ();
				client = null;
			}
                }
Пример #14
0
 public RegisterService()
 {
     client = new AV.Client();
 }
Пример #15
0
                private void Publish ()
                {
                        if (client == null)
                                client = new Client ();
                        
                        try {
				string [] args = new string [] { "Password="******"true" : "false") };
					
				if (collisions > 0)
					name += String.Format (" ({0})", collisions);
                                        
				entry_group = new EntryGroup (client);
				entry_group.AddService (name, PROTOCOL, DOMAIN, port, args);
				entry_group.StateChanged += OnEntryGroupStateChanged;
				entry_group.Commit ();                               
                        } catch (ClientException e) {
                                if (e.ErrorCode == ErrorCode.Collision) {
                                        HandleCollision ();
                                        return;
                                } else {
                                        throw;
                                }
                        } catch (Exception e) {
                                Logger.Log.Error (e, "Zeroconf: Failed to publish service - '{0}'", name);
                                // FIXME: Shutdown or unpublish the service
			}
                }
 public AddressResolver(Client client, IPAddress address)
     : this(client, -1, Protocol.Unspecified,
                                                                   address, LookupFlags.None)
 {
 }
Пример #17
0
 public DomainBrowser (Client client) : this (client, -1, Protocol.Unspecified, client.DomainName,
                                              DomainBrowserType.Browse, LookupFlags.None) {
 }
Пример #18
0
 public ServiceTypeBrowser (Client client, string domain) : this (client, -1, Protocol.Unspecified,
                                                                  domain, LookupFlags.None)
 {
 }
Пример #19
0
 public HostNameResolver (Client client, string hostname) : this (client, -1, Protocol.Unspecified,
                                                                  hostname, Protocol.Unspecified,
                                                                  LookupFlags.None)
 {
 }
Пример #20
0
 public void Initialize()
 {
     AV.Client client = new AV.Client();
     client.Dispose();
 }
Пример #21
0
 public ResolvableService(AV.Client client, AV.ServiceInfo service) : base(service)
 {
     this.client = client;
 }
Пример #22
0
 public ServiceBrowser(Client client, string type)
     : this(client, type, client.DomainName)
 {
 }
Пример #23
0
 public ResolvableService(AV.Client client, AV.ServiceInfo service)
     : base(service)
 {
     this.client = client;
 }
 public void Initialize()
 {
     AV.Client client = new AV.Client();
     client.Dispose();
 }
Пример #25
0
 public DomainBrowser (Client client, int iface, Protocol proto, string domain,
                       DomainBrowserType btype, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.domain = domain;
     this.btype = btype;
     this.flags = flags;
     cb = OnDomainBrowserCallback;
 }
Пример #26
0
 public RegisterService()
 {
     client = new AV.Client();
 }
Пример #27
0
 public ServiceTypeBrowser (Client client) : this (client, client.DomainName)
 {
 }
Пример #28
0
 public RecordBrowser (Client client, string name, RecordType type) :
     this (client, -1, Protocol.Unspecified, name, RecordClass.In, type, LookupFlags.None)
 {
 }
Пример #29
0
 public AvahiBrowser ()
 {
         this.services = new List<NetworkService> ();
         this.avahi_client = new Avahi.Client ();
 }
Пример #30
0
 public RecordBrowser (Client client, int iface, Protocol proto, string name, RecordClass clazz,
                       RecordType type, LookupFlags flags)
 {
     this.client = client;
     this.iface = iface;
     this.proto = proto;
     this.name = name;
     this.clazz = clazz;
     this.type = type;
     this.flags = flags;
     cb = OnRecordBrowserCallback;
 }
Пример #31
0
 public AvahiBrowser()
 {
     this.services     = new List <NetworkService> ();
     this.avahi_client = new Avahi.Client();
 }