diff options
Diffstat (limited to 'avahi-sharp/EntryGroup.cs')
-rw-r--r-- | avahi-sharp/EntryGroup.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/avahi-sharp/EntryGroup.cs b/avahi-sharp/EntryGroup.cs index a8744d0..443f198 100644 --- a/avahi-sharp/EntryGroup.cs +++ b/avahi-sharp/EntryGroup.cs @@ -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)); } } } |