]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/EntryGroup.cs
* Add RecordBrowser.cs
[catta] / avahi-sharp / EntryGroup.cs
index a8744d08ea687470948c77c7aea440feda062c4c..443f198c0d0b0fa60e5caf4c5c21b9a934bc72c6 100644 (file)
@@ -48,8 +48,23 @@ namespace Avahi
         Failure
     }
 
+    public class EntryGroupStateArgs : EventArgs
+    {
+        private EntryGroupState state;
+
+        public EntryGroupState State
+        {
+            get { return state; }
+        }
+        
+        public EntryGroupStateArgs (EntryGroupState state)
+        {
+            this.state = state;
+        }
+    }
+
     internal delegate void EntryGroupCallback (IntPtr group, EntryGroupState state, IntPtr userdata);
-    public delegate void EntryGroupStateHandler (object o, EntryGroupState state);
+    public delegate void EntryGroupStateHandler (object o, EntryGroupStateArgs args);
     
     public class EntryGroup : IDisposable
     {
@@ -208,7 +223,7 @@ namespace Avahi
         private void OnEntryGroupCallback (IntPtr group, EntryGroupState state, IntPtr userdata)
         {
             if (StateChanged != null)
-                StateChanged (this, state);
+                StateChanged (this, new EntryGroupStateArgs (state));
         }
     }
 }