]> git.meshlink.io Git - catta/commitdiff
add an 'Error' property to ClientStateArgs
authorJames Willcox <snopr@snorp.net>
Thu, 9 Mar 2006 20:27:47 +0000 (20:27 +0000)
committerJames Willcox <snopr@snorp.net>
Thu, 9 Mar 2006 20:27:47 +0000 (20:27 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1177 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-sharp/Client.cs

index 8ec6616d4403b956201f9d91c38884631540e5e2..6d39469072947cb6fd0f7ad694be45df239d013d 100644 (file)
@@ -52,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;
         }
     }
     
@@ -349,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) {