X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FEntryGroup.cs;h=ccdeec9fc5e24d138eb0cf72872f38e0af9b9415;hb=fa55e2d19d09d548431be0273e4c3c16efec1b99;hp=2ebecc2afee1b690192531a0a5afd3ce4b8e43d6;hpb=9a589e1f5221d1bd995b6c4fa73e3a074d4c2da4;p=catta diff --git a/avahi-sharp/EntryGroup.cs b/avahi-sharp/EntryGroup.cs index 2ebecc2..ccdeec9 100644 --- a/avahi-sharp/EntryGroup.cs +++ b/avahi-sharp/EntryGroup.cs @@ -275,6 +275,26 @@ namespace Avahi } } + UpdateService (iface, proto, flags, name, type, domain, list); + } + + public void UpdateService (int iface, Protocol proto, PublishFlags flags, string name, string type, + string domain, params byte[][] txt) + { + IntPtr list = avahi_string_list_new (IntPtr.Zero); + + if (txt != null) { + foreach (byte[] item in txt) { + list = avahi_string_list_add (list, item); + } + } + + UpdateService (iface, proto, flags, name, type, domain, list); + } + + private void UpdateService (int iface, Protocol proto, PublishFlags flags, string name, string type, + string domain, IntPtr list) + { lock (client) { int ret = avahi_entry_group_update_service_strlst (handle, iface, proto, flags, Utility.StringToBytes (name),