Inheritance: 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))
 {
 }
 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;
 }
Esempio n. 4
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;
 }
Esempio n. 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;
        }
 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;
 }
Esempio n. 8
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 ();
            }
        }
Esempio n. 9
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;
 }
Esempio n. 11
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;
			}
                }
Esempio n. 12
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;
 }
Esempio n. 13
0
 public void Initialize()
 {
     AV.Client client = new AV.Client();
     client.Dispose();
 }
Esempio n. 14
0
                private void Publish ()
                {
                        if (client == null)
                                client = new Client ();
                        
                        try {
				string [] args = new string [] { "Password=" + (Conf.Networking.GetOption (Conf.Names.PasswordRequired, true) ? "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
			}
                }
Esempio n. 15
0
 public HostNameResolver (Client client, string hostname) : this (client, -1, Protocol.Unspecified,
                                                                  hostname, Protocol.Unspecified,
                                                                  LookupFlags.None)
 {
 }
 public AddressResolver(Client client, IPAddress address)
     : this(client, -1, Protocol.Unspecified,
                                                                   address, LookupFlags.None)
 {
 }
Esempio n. 17
0
 public ServiceTypeBrowser (Client client, string domain) : this (client, -1, Protocol.Unspecified,
                                                                  domain, LookupFlags.None)
 {
 }
Esempio n. 18
0
 public ServiceTypeBrowser (Client client) : this (client, client.DomainName)
 {
 }
Esempio n. 19
0
 public AvahiBrowser ()
 {
         this.services = new List<NetworkService> ();
         this.avahi_client = new Avahi.Client ();
 }
Esempio n. 20
0
 public RegisterService()
 {
     client = new AV.Client();
 }
Esempio n. 21
0
 public RecordBrowser (Client client, string name, RecordType type) :
     this (client, -1, Protocol.Unspecified, name, RecordClass.In, type, LookupFlags.None)
 {
 }
Esempio n. 22
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;
 }
Esempio n. 23
0
 public DomainBrowser (Client client) : this (client, -1, Protocol.Unspecified, client.DomainName,
                                              DomainBrowserType.Browse, LookupFlags.None) {
 }
Esempio n. 24
0
 public ServiceBrowser(Client client, string type)
     : this(client, type, client.DomainName)
 {
 }
Esempio n. 25
0
 public ResolvableService(AV.Client client, AV.ServiceInfo service)
     : base(service)
 {
     this.client = client;
 }