X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-ui-sharp%2FServiceDialog.cs;h=31f74799aba55f82b0fc089d765afd9463c02b6a;hb=908e491f7d55209acfbb2595ab1ef5b24502d641;hp=e0306e108f2d34cc3f3edef1ab73ef65663e5f7d;hpb=2b2844b10d7b7e5c97f9c667d664d9418bb7769a;p=catta diff --git a/avahi-ui-sharp/ServiceDialog.cs b/avahi-ui-sharp/ServiceDialog.cs index e0306e1..31f7479 100644 --- a/avahi-ui-sharp/ServiceDialog.cs +++ b/avahi-ui-sharp/ServiceDialog.cs @@ -27,13 +27,13 @@ namespace Avahi.UI [DllImport ("avahi-ui")] private static extern IntPtr aui_service_dialog_get_service_type (IntPtr dialog); - + [DllImport ("avahi-ui")] private static extern void aui_service_dialog_set_service_type (IntPtr dialog, IntPtr type); [DllImport ("avahi-ui")] private static extern IntPtr aui_service_dialog_get_service_name (IntPtr dialog); - + [DllImport ("avahi-ui")] private static extern void aui_service_dialog_set_service_name (IntPtr dialog, IntPtr type); @@ -114,7 +114,7 @@ namespace Avahi.UI for (int i = 0;;i++) { if (types[i] != IntPtr.Zero) break; - + GLib.Marshaller.Free (types[i]); } } @@ -172,11 +172,11 @@ namespace Avahi.UI get { ArrayList txtlist = new ArrayList (); IntPtr txt = aui_service_dialog_get_txt_data (Raw); - + for (IntPtr l = txt; l != IntPtr.Zero; l = avahi_string_list_get_next (l)) { IntPtr buf = avahi_string_list_get_text (l); int len = avahi_string_list_get_size (l); - + byte[] txtbuf = new byte[len]; Marshal.Copy (buf, txtbuf, 0, len); txtlist.Add (txtbuf); @@ -209,7 +209,7 @@ namespace Avahi.UI aui_service_dialog_set_address_family (Raw, value); } } - + public ServiceDialog (string title, Window parent, params object[] buttonData) { Raw = aui_service_dialog_new (title, parent == null ? IntPtr.Zero : parent.Handle, @@ -223,7 +223,7 @@ namespace Avahi.UI private static IPAddress PtrToAddress (IntPtr ptr) { IPAddress address = null; - + if (ptr != IntPtr.Zero) { IntPtr buf = Stdlib.malloc (256); IntPtr addrPtr = avahi_address_snprint (buf, 256, ptr);