diff options
Diffstat (limited to 'avahi-ui-sharp')
-rw-r--r-- | avahi-ui-sharp/Makefile.am | 12 | ||||
-rw-r--r-- | avahi-ui-sharp/ServiceDialog.cs | 14 | ||||
-rw-r--r-- | avahi-ui-sharp/bssh.cs | 8 |
3 files changed, 16 insertions, 18 deletions
diff --git a/avahi-ui-sharp/Makefile.am b/avahi-ui-sharp/Makefile.am index 6183f48..28ea64f 100644 --- a/avahi-ui-sharp/Makefile.am +++ b/avahi-ui-sharp/Makefile.am @@ -1,5 +1,3 @@ -# $Id: Makefile.am 1251 2006-08-21 23:31:59Z lennart $ - # This file is part of avahi. # # avahi is free software; you can redistribute it and/or modify it @@ -34,13 +32,13 @@ EXTRA_DIST = \ $(srcdir)/bssh.cs $(ASSEMBLY): $(AVAHISOURCES) - mcs -keyfile:$(top_srcdir)/avahi-sharp/avahi.snk -target:library -out:$@ -debug $(AVAHISOURCES) -pkg:gtk-sharp-2.0 -r:$(top_builddir)/avahi-sharp/avahi-sharp.dll -r:Mono.Posix + $(AM_V_GEN)mcs -keyfile:$(top_srcdir)/avahi-sharp/avahi.snk -target:library -out:$@ -debug $(AVAHISOURCES) -pkg:gtk-sharp-2.0 -r:$(top_builddir)/avahi-sharp/avahi-sharp.dll -r:Mono.Posix $(ASSEMBLY).config: $(ASSEMBLY).config.in - $(srcdir)/gencfg.sh $(top_builddir)/avahi-common/libavahi-common.la < $< > $@ + $(AM_V_GEN)$(srcdir)/gencfg.sh $(top_builddir)/avahi-common/libavahi-common.la < $< > $@ bssh.exe: $(srcdir)/bssh.cs $(ASSEMBLY) - mcs -out:$@ $(srcdir)/bssh.cs -r:./avahi-ui-sharp.dll -r:../avahi-sharp/avahi-sharp.dll -pkg:gtk-sharp-2.0 -r:Mono.Posix + $(AM_V_GEN)mcs -out:$@ $(srcdir)/bssh.cs -r:./avahi-ui-sharp.dll -r:../avahi-sharp/avahi-sharp.dll -pkg:gtk-sharp-2.0 -r:Mono.Posix if HAVE_MONO if HAVE_DBUS @@ -49,12 +47,12 @@ all: $(ASSEMBLY) $(ASSEMBLY).config bssh.exe if HAVE_MONODOC update-docs: $(ASSEMBLY) - $(MONODOCER) -assembly:$(ASSEMBLY) -path:en + $(AM_V_GEN)$(MONODOCER) -assembly:$(ASSEMBLY) -path:en avahi-ui-sharp-docs.zip: avahi-ui-sharp-docs.tree avahi-ui-sharp-docs.tree: $(srcdir)/en/*/* - $(MDASSEMBLER) --out avahi-ui-sharp-docs --ecma $(srcdir)/en + $(AM_V_GEN)$(MDASSEMBLER) --out avahi-ui-sharp-docs --ecma $(srcdir)/en monodocdir = $(MONODOC_DIR) monodoc_DATA = avahi-ui-sharp-docs.zip avahi-ui-sharp-docs.tree avahi-ui-sharp-docs.source 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); diff --git a/avahi-ui-sharp/bssh.cs b/avahi-ui-sharp/bssh.cs index 003a3a6..fa3d4d4 100644 --- a/avahi-ui-sharp/bssh.cs +++ b/avahi-ui-sharp/bssh.cs @@ -5,8 +5,8 @@ using Avahi.UI; public class EntryPoint { public static void Main () { - Application.Init (); - + Application.Init (); + ServiceDialog dialog = new ServiceDialog ("Choose SSH Server", null, Stock.Cancel, ResponseType.Cancel, Stock.Connect, ResponseType.Accept); @@ -17,11 +17,11 @@ public class EntryPoint { Console.WriteLine ("Connecting to {0}:{1}", dialog.Address, dialog.Port); string user = Environment.UserName; - + foreach (byte[] txtBytes in dialog.TxtData) { string txt = System.Text.Encoding.UTF8.GetString (txtBytes); string[] splitTxt = txt.Split(new char[] { '=' }, 2); - + if (splitTxt.Length != 2) continue; |