diff src/com/five_ten_sg/connectbot/bean/HostBean.java @ 83:4ccfde0bc506

disable host config items that are not applicable to the host protocol
author Carl Byington <carl@five-ten-sg.com>
date Mon, 16 Jun 2014 10:43:30 -0700
parents 07c7055cc124
children 1c22e6a7efff
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/bean/HostBean.java	Mon Jun 16 09:55:39 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/bean/HostBean.java	Mon Jun 16 10:43:30 2014 -0700
@@ -73,6 +73,22 @@
         this.port = port;
     }
 
+    public boolean isSSH() {
+        return (protocol == "ssh");
+    }
+
+    public boolean is5250() {
+        return (protocol == "tn5250");
+    }
+
+    public boolean isTelnet() {
+        return (protocol == "telnet");
+    }
+
+    public boolean isAsync() {
+        return isSSH() || isTelnet();
+    }
+
     public void setId(long id) {
         this.id = id;
     }