diff --git a/Makefile.in b/Makefile.in index c4cb28a..ab169f2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -94,6 +94,7 @@ tn3270-sharp-@PACKAGE_VERSION@.@host@.zip: \ @zip -9 -j $@ \ $(BINRLS)/$(GLUELIB) \ $(BINRLS)/$(LIBNAME) \ + $(BINRLS)/*.xml \ testprograms/sample.cs \ src/tn3270-sharp/tn3270-sharp.cs \ $(BINRLS)/sample.exe diff --git a/src/tn3270-sharp/Makefile.in b/src/tn3270-sharp/Makefile.in index 2ae53a8..ae1c940 100644 --- a/src/tn3270-sharp/Makefile.in +++ b/src/tn3270-sharp/Makefile.in @@ -80,6 +80,6 @@ $(BINRLS)/$(LIBNAME): \ $(SOURCES) @$(MKDIR) `dirname $@` - @$(MCS) -target:library -out:$@ $< + @$(MCS) -doc:$(basename $@).xml -target:library -out:$@ $< diff --git a/src/tn3270-sharp/tn3270-sharp.cs b/src/tn3270-sharp/tn3270-sharp.cs index f34622a..c5d05a3 100644 --- a/src/tn3270-sharp/tn3270-sharp.cs +++ b/src/tn3270-sharp/tn3270-sharp.cs @@ -36,8 +36,14 @@ using System.Runtime.InteropServices; namespace tn3270 { + /// + /// Session with 3270 HOST. + /// public class Session { + /// + /// lib3270 session handle + /// private IntPtr hSession; [DllImport ("lib3270-mono")] @@ -109,34 +115,82 @@ namespace tn3270 { [DllImport ("lib3270-mono")] extern static int tn3270_pakey(IntPtr Session, int key); + /// + /// Create a new session with lib3270/pw3270 + /// + /// + /// Session name or empty string for a hidden session + /// public Session(string name) { hSession = tn3270_create_session(name); } + /// + /// Disconnect from host, destroy session. + /// + /// ~Session() { tn3270_destroy_session(hSession); } + /// + /// Get lib3270/pw3270 Version identifier + /// + /// + /// + /// The version of the active instance. + /// + /// public string GetVersion() { StringBuilder str = new StringBuilder(10); tn3270_get_version(hSession, str, 10); return str.ToString(); } + /// + /// Get lib3270/pw3270 Revision number + /// + /// + /// + /// The revision of the active instance. + /// + /// public string GetRevision() { StringBuilder str = new StringBuilder(10); tn3270_get_revision(hSession, str, 10); return str.ToString(); } + /// + /// Connect to 3270 host. + /// + /// + /// URL of the target host (tn3270://hostname:port) + /// How many seconds should the call wait for the connection becomes ready + /// + /// + /// + /// public int Connect(string host, int wait) { return tn3270_connect(hSession, host, wait); } + /// + /// Get connection statue + /// + /// + /// + /// true if the session is connected to a remote host. + /// + /// public bool IsConnected() { return tn3270_is_connected(hSession) != 0; } + /// + /// Disconnect from 3270 host. + /// + /// public int Disconnect() { return tn3270_disconnect(hSession); } -- libgit2 0.21.2