summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/DomainBrowser.cs
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-09-26 03:57:30 +0000
committerJames Willcox <snopr@snorp.net>2005-09-26 03:57:30 +0000
commita4c2edcece605452c4d72da36b8c39da5e514314 (patch)
tree29737fdadb25ce064719db9e7bd85adf96e78ed8 /avahi-sharp/DomainBrowser.cs
parent2920c718017cf93a15f1e3a9c20b3cbb3e2f1f9a (diff)
add some missing events to the resolver classes, and make them
inherit from a base class which contains these events git-svn-id: file:///home/lennart/svn/public/avahi/trunk@635 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/DomainBrowser.cs')
-rw-r--r--avahi-sharp/DomainBrowser.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/avahi-sharp/DomainBrowser.cs b/avahi-sharp/DomainBrowser.cs
index fb32e77..3ce9e4d 100644
--- a/avahi-sharp/DomainBrowser.cs
+++ b/avahi-sharp/DomainBrowser.cs
@@ -46,7 +46,7 @@ namespace Avahi
public delegate void DomainInfoHandler (object o, DomainInfo info);
- public class DomainBrowser : IDisposable
+ public class DomainBrowser : BrowserBase, IDisposable
{
private IntPtr handle;
private ArrayList infos = new ArrayList ();
@@ -161,17 +161,23 @@ namespace Avahi
info.Flags = flags;
infos.Add (info);
-
- if (bevent == BrowserEvent.Added) {
+
+ switch (bevent) {
+ case BrowserEvent.Added:
infos.Add (info);
foreach (DomainInfoHandler handler in addListeners)
handler (this, info);
- } else {
+ break;
+ case BrowserEvent.Removed:
infos.Remove (info);
foreach (DomainInfoHandler handler in removeListeners)
handler (this, info);
+ break;
+ default:
+ EmitBrowserEvent (bevent);
+ break;
}
}
}