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 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; }
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; }
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 (); } }
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; }
public void Dispose() { if (client != null) { client.Dispose(); client = null; } if (browser != null) { browser.Dispose(); browser = null; } }
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; } }
public RegisterService() { client = new AV.Client(); }
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) { }
public DomainBrowser (Client client) : this (client, -1, Protocol.Unspecified, client.DomainName, DomainBrowserType.Browse, LookupFlags.None) { }
public ServiceTypeBrowser (Client client, string domain) : this (client, -1, Protocol.Unspecified, domain, LookupFlags.None) { }
public HostNameResolver (Client client, string hostname) : this (client, -1, Protocol.Unspecified, hostname, Protocol.Unspecified, LookupFlags.None) { }
public void Initialize() { AV.Client client = new AV.Client(); client.Dispose(); }
public ResolvableService(AV.Client client, AV.ServiceInfo service) : base(service) { this.client = client; }
public ServiceBrowser(Client client, string type) : this(client, type, client.DomainName) { }
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; }
public ServiceTypeBrowser (Client client) : this (client, client.DomainName) { }
public RecordBrowser (Client client, string name, RecordType type) : this (client, -1, Protocol.Unspecified, name, RecordClass.In, type, LookupFlags.None) { }
public AvahiBrowser () { this.services = new List<NetworkService> (); this.avahi_client = new Avahi.Client (); }
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; }
public AvahiBrowser() { this.services = new List <NetworkService> (); this.avahi_client = new Avahi.Client(); }