From 84a9392791c574c56ca148157b8b951851208398 Mon Sep 17 00:00:00 2001 From: James Willcox Date: Thu, 17 Nov 2005 17:55:09 +0000 Subject: * Add RecordBrowser.cs * Make all of the events like "standard" .NET ones git-svn-id: file:///home/lennart/svn/public/avahi/trunk@996 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-sharp/EntryGroup.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'avahi-sharp/EntryGroup.cs') 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)); } } } -- cgit