private static extern IntPtr avahi_string_list_new (IntPtr txt);
[DllImport ("avahi-common")]
- private static extern void avahi_string_list_add (IntPtr list, IntPtr txt);
+ private static extern IntPtr avahi_string_list_add (IntPtr list, IntPtr txt);
[DllImport ("avahi-common")]
private static extern void avahi_string_list_free (IntPtr list);
if (txt != null) {
foreach (string item in txt) {
IntPtr itemPtr = Utility.StringToPtr (item);
- avahi_string_list_add (list, itemPtr);
+ list = avahi_string_list_add (list, itemPtr);
Utility.Free (itemPtr);
}
}
avahi_string_list_free (list);
client.CheckError ();
-
- Console.WriteLine ("Added service: {0}, {1}, {2}, {3}, {4}", name, type, domain, host, port);
}
private void OnEntryGroupCallback (IntPtr group, EntryGroupState state, IntPtr userdata)
IntPtr hostPtr = Utility.StringToPtr (hostname);
handle = avahi_host_name_resolver_new (client.Handle, iface, proto, hostPtr, aproto,
- OnHostNameResolverCallback, IntPtr.Zero);
+ cb, IntPtr.Zero);
Utility.Free (hostPtr);
}
if HAVE_MONO
all: $(ASSEMBLY)
-install-data-hook:
+install-data-hook: $(ASSEMBLY)
$(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
+
+uninstall-hook: $(ASSEMBLY)
+ $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
endif
IntPtr domain, IntPtr host, IntPtr address,
UInt16 port, IntPtr txt, IntPtr userdata)
{
+
ServiceInfo info;
info.NetworkInterface = iface;
info.Protocol = proto;