summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/HostNameResolver.cs
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-09-25 22:09:41 +0000
committerJames Willcox <snopr@snorp.net>2005-09-25 22:09:41 +0000
commitcc272cf44768c9292879a9ee43783fec4b510ffd (patch)
tree82b1121ff5e58a1b7319f0b555ded29caf3bae7f /avahi-sharp/HostNameResolver.cs
parent9247af4048229c9b777791fd087e2068dd785a7d (diff)
* update to the latest avahi-client API (LookupFlags)
* add the local service cookie bits * update docs git-svn-id: file:///home/lennart/svn/public/avahi/trunk@620 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/HostNameResolver.cs')
-rw-r--r--avahi-sharp/HostNameResolver.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/avahi-sharp/HostNameResolver.cs b/avahi-sharp/HostNameResolver.cs
index d522cea..fad5d77 100644
--- a/avahi-sharp/HostNameResolver.cs
+++ b/avahi-sharp/HostNameResolver.cs
@@ -30,7 +30,7 @@ namespace Avahi
internal delegate void HostNameResolverCallback (IntPtr resolver, int iface, Protocol proto,
ResolverEvent revent, IntPtr hostname, IntPtr address,
- IntPtr userdata);
+ LookupResultFlags flags, IntPtr userdata);
public class HostNameResolver : IDisposable
{
@@ -40,6 +40,7 @@ namespace Avahi
private Protocol proto;
private string hostname;
private Protocol aproto;
+ private LookupFlags flags;
private HostNameResolverCallback cb;
private IPAddress currentAddress;
@@ -50,7 +51,7 @@ namespace Avahi
[DllImport ("avahi-client")]
private static extern IntPtr avahi_host_name_resolver_new (IntPtr client, int iface, Protocol proto,
- IntPtr hostname, Protocol aproto,
+ IntPtr hostname, Protocol aproto, LookupFlags flags,
HostNameResolverCallback cb, IntPtr userdata);
[DllImport ("avahi-client")]
@@ -91,18 +92,20 @@ namespace Avahi
}
public HostNameResolver (Client client, string hostname) : this (client, -1, Protocol.Unspecified,
- hostname, Protocol.Unspecified)
+ hostname, Protocol.Unspecified,
+ LookupFlags.None)
{
}
public HostNameResolver (Client client, int iface, Protocol proto, string hostname,
- Protocol aproto)
+ Protocol aproto, LookupFlags flags)
{
this.client = client;
this.iface = iface;
this.proto = proto;
this.hostname = hostname;
this.aproto = aproto;
+ this.flags = flags;
cb = OnHostNameResolverCallback;
}
@@ -125,7 +128,7 @@ namespace Avahi
IntPtr hostPtr = Utility.StringToPtr (hostname);
lock (client) {
- handle = avahi_host_name_resolver_new (client.Handle, iface, proto, hostPtr, aproto,
+ handle = avahi_host_name_resolver_new (client.Handle, iface, proto, hostPtr, aproto, flags,
cb, IntPtr.Zero);
}
@@ -146,7 +149,7 @@ namespace Avahi
private void OnHostNameResolverCallback (IntPtr resolver, int iface, Protocol proto,
ResolverEvent revent, IntPtr hostname, IntPtr address,
- IntPtr userdata)
+ LookupResultFlags flags, IntPtr userdata)
{
if (revent == ResolverEvent.Found) {
currentAddress = Utility.PtrToAddress (address);