]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/Client.cs
add utf8 validity check API (based on the glib's implementation and hence mostly...
[catta] / avahi-sharp / Client.cs
index 80349ddb9902b5e925668f1e578cf6de6d1bb41a..6d39469072947cb6fd0f7ad694be45df239d013d 100644 (file)
@@ -25,6 +25,9 @@ using System.Threading;
 using System.Collections;
 using System.Runtime.InteropServices;
 using Mono.Unix;
+using Mono.Unix.Native;
+
+using Stdlib = Mono.Unix.Native.Stdlib;
 
 namespace Avahi
 {
@@ -49,15 +52,22 @@ namespace Avahi
     public class ClientStateArgs : EventArgs
     {
         private ClientState state;
+        private ErrorCode error;
 
         public ClientState State
         {
             get { return state; }
         }
 
-        public ClientStateArgs (ClientState state)
+        public ErrorCode Error
+        {
+            get { return error; }
+        }
+
+        public ClientStateArgs (ClientState state, ErrorCode error)
         {
             this.state = state;
+            this.error = error;
         }
     }
     
@@ -86,7 +96,8 @@ namespace Avahi
     public enum LookupFlags {
         None = 0,
         UseWideArea = 1,
-        UseMulticast = 4,
+        UseMulticast = 2,
+       NoTxt = 4,
         NoAddress = 8
     }
 
@@ -345,7 +356,7 @@ namespace Avahi
         private void OnClientCallback (IntPtr client, ClientState state, IntPtr userData)
         {
             if (StateChanged != null)
-                StateChanged (this, new ClientStateArgs (state));
+                StateChanged (this, new ClientStateArgs (state, LastError));
         }
 
         private int OnPollCallback (IntPtr ufds, uint nfds, int timeout) {