diff options
author | James Willcox <snopr@snorp.net> | 2005-10-26 03:20:44 +0000 |
---|---|---|
committer | James Willcox <snopr@snorp.net> | 2005-10-26 03:20:44 +0000 |
commit | 94d2753047cff1e9223e42736884e4d51348b45a (patch) | |
tree | 5d4173121818486d3adaa3c3b357b2a6f893860c /avahi-sharp/AddressResolver.cs | |
parent | 58dbdd3113ff75b7262ac2e7a8474550a2dacfd3 (diff) |
first pass at updating to the 0.6 apis
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@876 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/AddressResolver.cs')
-rw-r--r-- | avahi-sharp/AddressResolver.cs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/avahi-sharp/AddressResolver.cs b/avahi-sharp/AddressResolver.cs index 01211ae..3231cbf 100644 --- a/avahi-sharp/AddressResolver.cs +++ b/avahi-sharp/AddressResolver.cs @@ -29,7 +29,7 @@ namespace Avahi { internal delegate void AddressResolverCallback (IntPtr resolver, int iface, Protocol proto, - ResolverEvent revent, Protocol aproto, IntPtr address, + ResolverEvent revent, IntPtr address, IntPtr hostname, LookupResultFlags flags, IntPtr userdata); public delegate void HostAddressHandler (object o, string host, IPAddress address); @@ -124,7 +124,7 @@ namespace Avahi (foundListeners.Count == 0 && timeoutListeners.Count == 0)) return; - IntPtr addrPtr = Utility.StringToPtr (address.ToString ()); + IntPtr addrPtr = Utility.AddressToPtr (address); lock (client) { handle = avahi_address_resolver_new (client.Handle, iface, proto, addrPtr, flags, @@ -147,7 +147,7 @@ namespace Avahi } private void OnAddressResolverCallback (IntPtr resolver, int iface, Protocol proto, - ResolverEvent revent, Protocol aproto, IntPtr address, + ResolverEvent revent, IntPtr address, IntPtr hostname, LookupResultFlags flags, IntPtr userdata) { switch (revent) { @@ -158,15 +158,8 @@ namespace Avahi foreach (HostAddressHandler handler in foundListeners) handler (this, currentHost, currentAddress); break; - case ResolverEvent.Timeout: - currentAddress = null; - currentHost = null; - - foreach (EventHandler handler in timeoutListeners) - handler (this, new EventArgs ()); - break; - default: - EmitResolverEvent (revent); + case ResolverEvent.Failure: + EmitFailure (client.LastError); break; } } |