diff options
author | James Willcox <snopr@snorp.net> | 2005-11-17 17:55:09 +0000 |
---|---|---|
committer | James Willcox <snopr@snorp.net> | 2005-11-17 17:55:09 +0000 |
commit | 84a9392791c574c56ca148157b8b951851208398 (patch) | |
tree | 3faf9ccf41d970b0c686907f9a3a6c93f3c5736d /avahi-sharp/Client.cs | |
parent | e285034f90e0856d13a441b0e8d355f9b34aa95b (diff) |
* 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
Diffstat (limited to 'avahi-sharp/Client.cs')
-rw-r--r-- | avahi-sharp/Client.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/avahi-sharp/Client.cs b/avahi-sharp/Client.cs index 394efc5..01b08bd 100644 --- a/avahi-sharp/Client.cs +++ b/avahi-sharp/Client.cs @@ -43,8 +43,23 @@ namespace Avahi internal delegate int PollCallback (IntPtr ufds, uint nfds, int timeout); internal delegate void ClientCallback (IntPtr client, ClientState state, IntPtr userData); - public delegate void ClientStateHandler (object o, ClientState state); + public delegate void ClientStateHandler (object o, ClientStateArgs state); + public class ClientStateArgs : EventArgs + { + private ClientState state; + + public ClientState State + { + get { return state; } + } + + public ClientStateArgs (ClientState state) + { + this.state = state; + } + } + public enum Protocol { Unspecified = -1, IPv4 = 0, @@ -268,7 +283,7 @@ namespace Avahi private void OnClientCallback (IntPtr client, ClientState state, IntPtr userData) { if (StateChanged != null) - StateChanged (this, state); + StateChanged (this, new ClientStateArgs (state)); } private int OnPollCallback (IntPtr ufds, uint nfds, int timeout) { |