summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/ServiceTypeBrowser.cs
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-09-25 22:09:41 +0000
committerJames Willcox <snopr@snorp.net>2005-09-25 22:09:41 +0000
commitcc272cf44768c9292879a9ee43783fec4b510ffd (patch)
tree82b1121ff5e58a1b7319f0b555ded29caf3bae7f /avahi-sharp/ServiceTypeBrowser.cs
parent9247af4048229c9b777791fd087e2068dd785a7d (diff)
* update to the latest avahi-client API (LookupFlags)
* add the local service cookie bits * update docs git-svn-id: file:///home/lennart/svn/public/avahi/trunk@620 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/ServiceTypeBrowser.cs')
-rw-r--r--avahi-sharp/ServiceTypeBrowser.cs22
1 files changed, 15 insertions, 7 deletions
diff --git a/avahi-sharp/ServiceTypeBrowser.cs b/avahi-sharp/ServiceTypeBrowser.cs
index ab6a866..4d996d6 100644
--- a/avahi-sharp/ServiceTypeBrowser.cs
+++ b/avahi-sharp/ServiceTypeBrowser.cs
@@ -26,7 +26,8 @@ using System.Runtime.InteropServices;
namespace Avahi
{
internal delegate void ServiceTypeBrowserCallback (IntPtr browser, int iface, Protocol proto, BrowserEvent bevent,
- IntPtr type, IntPtr domain, IntPtr userdata);
+ IntPtr type, IntPtr domain, LookupResultFlags flags,
+ IntPtr userdata);
public struct ServiceTypeInfo
{
@@ -34,6 +35,7 @@ namespace Avahi
public Protocol Protocol;
public string Domain;
public string ServiceType;
+ public LookupResultFlags Flags;
}
public delegate void ServiceTypeInfoHandler (object o, ServiceTypeInfo info);
@@ -46,6 +48,7 @@ namespace Avahi
private int iface;
private Protocol proto;
private string domain;
+ private LookupFlags flags;
private ServiceTypeBrowserCallback cb;
private ArrayList addListeners = new ArrayList ();
@@ -53,7 +56,8 @@ namespace Avahi
[DllImport ("avahi-client")]
private static extern IntPtr avahi_service_type_browser_new (IntPtr client, int iface, int proto,
- IntPtr domain, ServiceTypeBrowserCallback cb,
+ IntPtr domain, LookupFlags flags,
+ ServiceTypeBrowserCallback cb,
IntPtr userdata);
[DllImport ("avahi-client")]
@@ -92,16 +96,18 @@ namespace Avahi
{
}
- public ServiceTypeBrowser (Client client, string domain) : this (client, -1, Protocol.Unspecified, domain)
+ public ServiceTypeBrowser (Client client, string domain) : this (client, -1, Protocol.Unspecified,
+ domain, LookupFlags.None)
{
}
-
- public ServiceTypeBrowser (Client client, int iface, Protocol proto, string domain)
+
+ public ServiceTypeBrowser (Client client, int iface, Protocol proto, string domain, LookupFlags flags)
{
this.client = client;
this.iface = iface;
this.proto = proto;
this.domain = domain;
+ this.flags = flags;
cb = OnServiceTypeBrowserCallback;
}
@@ -123,7 +129,7 @@ namespace Avahi
lock (client) {
IntPtr domainPtr = Utility.StringToPtr (domain);
- handle = avahi_service_type_browser_new (client.Handle, iface, (int) proto, domainPtr,
+ handle = avahi_service_type_browser_new (client.Handle, iface, (int) proto, domainPtr, flags,
cb, IntPtr.Zero);
Utility.Free (domainPtr);
}
@@ -142,7 +148,8 @@ namespace Avahi
}
private void OnServiceTypeBrowserCallback (IntPtr browser, int iface, Protocol proto, BrowserEvent bevent,
- IntPtr type, IntPtr domain, IntPtr userdata)
+ IntPtr type, IntPtr domain, LookupResultFlags flags,
+ IntPtr userdata)
{
ServiceTypeInfo info;
@@ -150,6 +157,7 @@ namespace Avahi
info.Protocol = proto;
info.Domain = Utility.PtrToString (domain);
info.ServiceType = Utility.PtrToString (type);
+ info.Flags = flags;
infos.Add (info);