changeset 13:b39bcf616a6f tn5250

adding tn5250 files
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 18:56:41 -0700
parents 6aaefb22d876
children 51f34b9de232
files src/com/five_ten_sg/connectbot/transport/TN5250.java src/com/five_ten_sg/connectbot/transport/Telnet.java src/com/five_ten_sg/connectbot/transport/TransportFactory.java src/org/tn5250j/framework/tn5250/tnvt.java src/org/tn5250j/framework/transport/SSL/SSLImplementation.java
diffstat 5 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Thu May 22 18:41:36 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Thu May 22 18:56:41 2014 -0700
@@ -22,12 +22,16 @@
 import java.io.OutputStream;
 import java.net.Socket;
 import java.net.SocketException;
+import java.net.UnknownHostException;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.tn5250j.framework.tn5250.Screen5250;
 import org.tn5250j.framework.tn5250.tnvt;
 
+import com.five_ten_sg.connectbot.R;
 import com.five_ten_sg.connectbot.bean.HostBean;
 import com.five_ten_sg.connectbot.bean.PortForwardBean;
 import com.five_ten_sg.connectbot.service.TerminalBridge;
@@ -36,7 +40,7 @@
 
 import android.content.Context;
 import android.net.Uri;
-
+import android.util.Log;
 
 
 /**
@@ -127,9 +131,9 @@
    @Override
    public void connect() {
        try {
-            connected = tnvt.connect(host.getHostname(), host.getPort());
-            is = tnvt.bin;
-            os = tnvt.bout;
+            connected = handler.connect(host.getHostname(), host.getPort());
+            is = handler.bin;
+            os = handler.bout;
             bridge.onConnected();
         }
         catch (UnknownHostException e) {
@@ -201,7 +205,7 @@
      * should call {@link TerminalBridge#dispatchDisconnect(boolean)}.
      */
     public void close() {
-        tnvt.disconnect();
+        handler.disconnect();
         connected = false;
     }
 
--- a/src/com/five_ten_sg/connectbot/transport/Telnet.java	Thu May 22 18:41:36 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/Telnet.java	Thu May 22 18:56:41 2014 -0700
@@ -37,8 +37,10 @@
 import android.content.Context;
 import android.net.Uri;
 import android.util.Log;
+
 import de.mud.telnet.TelnetProtocolHandler;
 
+
 /**
  * Telnet transport implementation.<br/>
  * Original idea from the JTA telnet package (de.mud.telnet)
--- a/src/com/five_ten_sg/connectbot/transport/TransportFactory.java	Thu May 22 18:41:36 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TransportFactory.java	Thu May 22 18:56:41 2014 -0700
@@ -63,10 +63,10 @@
         }
     }
 
-    public static Uri getUri(String scheme, String input) {
+    public static Uri getUri(String protocol, String input) {
         Log.d("TransportFactory", String.format(
-                  "Attempting to discover URI for scheme=%s on input=%s", scheme,
-                  input));
+                  "Attempting to discover URI for protocol=%s on input=%s",
+                  protocol, input));
         AbsTransport t = getTransport(protocol);
         if (t == null) return null;
         return t.getUri(input);
--- a/src/org/tn5250j/framework/tn5250/tnvt.java	Thu May 22 18:41:36 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/tnvt.java	Thu May 22 18:56:41 2014 -0700
@@ -82,6 +82,8 @@
 
 import com.five_ten_sg.connectbot.service.TerminalBridge;
 import com.five_ten_sg.connectbot.service.TerminalManager;
+import android.content.Intent;
+import android.net.Uri;
 
 import org.tn5250j.TN5250jConstants;
 import org.tn5250j.encoding.CharMappings;
--- a/src/org/tn5250j/framework/transport/SSL/SSLImplementation.java	Thu May 22 18:41:36 2014 -0700
+++ b/src/org/tn5250j/framework/transport/SSL/SSLImplementation.java	Thu May 22 18:56:41 2014 -0700
@@ -38,6 +38,7 @@
 import javax.net.ssl.TrustManagerFactory;
 import javax.net.ssl.X509TrustManager;
 
+import com.five_ten_sg.connectbot.R;
 import com.five_ten_sg.connectbot.service.TerminalBridge;
 import com.five_ten_sg.connectbot.service.TerminalManager;