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/AvahiTest.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/AvahiTest.cs')
-rw-r--r-- | avahi-sharp/AvahiTest.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/avahi-sharp/AvahiTest.cs b/avahi-sharp/AvahiTest.cs index 9c4aeca..0fac04b 100644 --- a/avahi-sharp/AvahiTest.cs +++ b/avahi-sharp/AvahiTest.cs @@ -41,10 +41,10 @@ public class AvahiTest { Console.ReadLine (); } - private static void OnEntryGroupChanged (object o, EntryGroupState state) + private static void OnEntryGroupChanged (object o, EntryGroupStateArgs args) { - Console.WriteLine ("Entry group status: " + state); - if (state == EntryGroupState.Established) { + Console.WriteLine ("Entry group status: " + args.State); + if (args.State == EntryGroupState.Established) { DomainBrowser browser = new DomainBrowser (client); objects.Add (browser); @@ -52,10 +52,10 @@ public class AvahiTest { } } - private static void OnDomainAdded (object o, DomainInfo info) + private static void OnDomainAdded (object o, DomainInfoArgs args) { - Console.WriteLine ("Got domain added: " + info.Domain); - BrowseServiceTypes (info.Domain); + Console.WriteLine ("Got domain added: " + args.Domain.Domain); + BrowseServiceTypes (args.Domain.Domain); } private static void BrowseServiceTypes (string domain) @@ -72,51 +72,51 @@ public class AvahiTest { Console.WriteLine ("Cache is exhausted"); } - private static void OnServiceTypeAdded (object o, ServiceTypeInfo info) + private static void OnServiceTypeAdded (object o, ServiceTypeInfoArgs args) { - Console.WriteLine ("Got service type: " + info.ServiceType); - ServiceBrowser sb = new ServiceBrowser (client, info.ServiceType, info.Domain); + Console.WriteLine ("Got service type: " + args.ServiceType.ServiceType); + ServiceBrowser sb = new ServiceBrowser (client, args.ServiceType.ServiceType, args.ServiceType.Domain); objects.Add (sb); sb.ServiceAdded += OnServiceAdded; } - private static void OnServiceAdded (object o, ServiceInfo info) + private static void OnServiceAdded (object o, ServiceInfoArgs args) { // Console.WriteLine ("Got service: " + info.Name); - ServiceResolver resolver = new ServiceResolver (client, info); + ServiceResolver resolver = new ServiceResolver (client, args.Service); objects.Add (resolver); resolver.Found += OnServiceResolved; } - private static void OnServiceResolved (object o, ServiceInfo info) + private static void OnServiceResolved (object o, ServiceInfoArgs args) { objects.Remove (o); - Console.WriteLine ("Service '{0}' at {1}:{2}", info.Name, info.HostName, info.Port); - foreach (byte[] bytes in info.Text) { + Console.WriteLine ("Service '{0}' at {1}:{2}", args.Service.Name, args.Service.HostName, args.Service.Port); + foreach (byte[] bytes in args.Service.Text) { Console.WriteLine ("Text: " + Encoding.UTF8.GetString (bytes)); } - AddressResolver ar = new AddressResolver (client, info.Address); + AddressResolver ar = new AddressResolver (client, args.Service.Address); objects.Add (ar); ar.Found += OnAddressResolved; } - private static void OnAddressResolved (object o, string host, IPAddress address) + private static void OnAddressResolved (object o, HostAddressArgs args) { objects.Remove (o); - Console.WriteLine ("Resolved {0} to {1}", address, host); - HostNameResolver hr = new HostNameResolver (client, host); + Console.WriteLine ("Resolved {0} to {1}", args.Address, args.Host); + HostNameResolver hr = new HostNameResolver (client, args.Host); objects.Add (hr); hr.Found += OnHostNameResolved; } - private static void OnHostNameResolved (object o, string host, IPAddress address) + private static void OnHostNameResolved (object o, HostAddressArgs args) { objects.Remove (o); - Console.WriteLine ("Resolved {0} to {1}", host, address); + Console.WriteLine ("Resolved {0} to {1}", args.Host, args.Address); } } |