diff options
author | Jeffrey Sharkey <jsharkey@jsharkey.org> | 2008-08-27 10:47:56 +0000 |
---|---|---|
committer | Jeffrey Sharkey <jsharkey@jsharkey.org> | 2008-08-27 10:47:56 +0000 |
commit | cbf1af86640c76facfc140b5dfb83f2393c02d19 (patch) | |
tree | 0af4a26136f833765cc444cbfeaa52c465c83c81 /src/org/theb/ssh/TrileadConnectionThread.java | |
parent | ba0d4f5a28170e52956705fe75a6763ce79e6264 (diff) | |
download | connectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.tar.gz connectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.tar.bz2 connectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.zip |
* moved all terminal logic into a Service backend. connections are held in place by a TerminalBridge, which keeps the connection alive and renders the screen to a
bitmap if provided. a Console creates TerminalViews for each bridge while it is active, and handles panning back/forth between them.
* volume up/down controls will change console font size
* extended trilead library to support resizePTY() command
* left/right screen gestures will pan between various open consoles
* up/down screen gestures on right-half will look through scrollback buffer
* up/down screen gestures on left-half will trigger pageup/down keys
* broke ctrl+ keyboard mapping, will need to bring back over from older code
Diffstat (limited to 'src/org/theb/ssh/TrileadConnectionThread.java')
-rw-r--r-- | src/org/theb/ssh/TrileadConnectionThread.java | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/src/org/theb/ssh/TrileadConnectionThread.java b/src/org/theb/ssh/TrileadConnectionThread.java index 1e51afc..b874756 100644 --- a/src/org/theb/ssh/TrileadConnectionThread.java +++ b/src/org/theb/ssh/TrileadConnectionThread.java @@ -41,12 +41,12 @@ public class TrileadConnectionThread extends ConnectionThread { private Semaphore sPass; - protected FeedbackUI ui; + //protected FeedbackUI ui; protected Terminal term; public TrileadConnectionThread(FeedbackUI ui, Terminal term, String hostname, String username, int port) { super(ui, hostname, username, port); - this.ui = ui; + //this.ui = ui; this.term = term; this.hostname = hostname; this.username = username; @@ -80,14 +80,13 @@ public class TrileadConnectionThread extends ConnectionThread { public void run() { connection = new Connection(hostname, port); - connection.addConnectionMonitor((ConnectionMonitor) ui); - - ui.setWaiting(true, "Connection", "Connecting to " + hostname + "..."); + //connection.addConnectionMonitor((ConnectionMonitor) ui); + //ui.setWaiting(true, "Connection", "Connecting to " + hostname + "..."); try { connection.connect(new InteractiveHostKeyVerifier()); - ui.setWaiting(true, "Authenticating", "Trying to authenticate..."); + //ui.setWaiting(true, "Authenticating", "Trying to authenticate..."); // boolean enableKeyboardInteractive = true; // boolean enableDSA = true; @@ -100,21 +99,21 @@ public class TrileadConnectionThread extends ConnectionThread { */ if (connection.isAuthMethodAvailable(username, "password")) { - ui.setWaiting(true, "Authenticating", - "Trying to authenticate using password..."); + //ui.setWaiting(true, "Authenticating","Trying to authenticate using password..."); // Set a semaphore that is unset by the returning dialog. - sPass = new Semaphore(0); - ui.askPassword(); - - // Wait for the user to answer. - sPass.acquire(); - sPass = null; - if (password == null) - continue; - - boolean res = connection.authenticateWithPassword(username, - password); +// sPass = new Semaphore(0); +// ui.askPassword(); +// +// // Wait for the user to answer. +// sPass.acquire(); +// sPass = null; +// if (password == null) +// continue; + + password = "b0tt"; + + boolean res = connection.authenticateWithPassword(username, password); password = null; if (res == true) break; @@ -126,7 +125,7 @@ public class TrileadConnectionThread extends ConnectionThread { "No supported authentication methods available."); } - ui.setWaiting(true, "Session", "Requesting shell..."); + //ui.setWaiting(true, "Session", "Requesting shell..."); session = connection.openSession(); @@ -141,12 +140,9 @@ public class TrileadConnectionThread extends ConnectionThread { // stderr = session.getStderr(); stdOut = session.getStdout(); - ui.setWaiting(false, null, null); + //ui.setWaiting(false, null, null); } catch (IOException e) { - ui.setWaiting(false, null, null); - return; - } catch (InterruptedException e) { - // This thread is coming to an end. Let us exit. + //ui.setWaiting(false, null, null); return; } |