# HG changeset patch # User Carl Byington # Date 1570232684 25200 # Node ID 2cc170e3fc9b53da2e3abcd7f732cfe7f32d6059 # Parent fbb1a98998fb2ba439c03363a84ae8962c8adfc4 audible bell checkbox enables/disables bell volume setting; monitor init string is now a url socket://target/initstring diff -r fbb1a98998fb -r 2cc170e3fc9b app/src/main/AndroidManifest.xml --- a/app/src/main/AndroidManifest.xml Thu Sep 12 16:08:16 2019 -0700 +++ b/app/src/main/AndroidManifest.xml Fri Oct 04 16:44:44 2019 -0700 @@ -17,8 +17,8 @@ --> diff -r fbb1a98998fb -r 2cc170e3fc9b app/src/main/java/com/five_ten_sg/connectbot/service/TerminalManager.java --- a/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalManager.java Thu Sep 12 16:08:16 2019 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalManager.java Fri Oct 04 16:44:44 2019 -0700 @@ -106,6 +106,7 @@ private volatile boolean wantKeyVibration; public static final long VIBRATE_DURATION = 30; + private boolean wantBell; private boolean wantBellVibration; private boolean resizeAllowed = true; @@ -146,8 +147,9 @@ vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); wantKeyVibration = prefs.getBoolean(PreferenceConstants.BUMPY_ARROWS, true); + wantBell = prefs.getBoolean(PreferenceConstants.BELL, true); wantBellVibration = prefs.getBoolean(PreferenceConstants.BELL_VIBRATE, true); - enableMediaPlayer(); + if (wantBell) enableMediaPlayer(); hardKeyboardHidden = (res.getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES); final boolean lockingWifi = prefs.getBoolean(PreferenceConstants.WIFI_LOCK, true); @@ -602,12 +604,11 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if (PreferenceConstants.BELL.equals(key)) { - boolean wantAudible = sharedPreferences.getBoolean( - PreferenceConstants.BELL, true); + wantBell = sharedPreferences.getBoolean(PreferenceConstants.BELL, true); - if (wantAudible && mediaPlayer == null) + if (wantBell && mediaPlayer == null) enableMediaPlayer(); - else if (!wantAudible && mediaPlayer != null) + else if (!wantBell && mediaPlayer != null) disableMediaPlayer(); } else if (PreferenceConstants.BELL_VOLUME.equals(key)) { diff -r fbb1a98998fb -r 2cc170e3fc9b app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java --- a/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java Thu Sep 12 16:08:16 2019 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 04 16:44:44 2019 -0700 @@ -64,12 +64,13 @@ public static final char CURSOR_USER_KEY = 2; private static final int MONITORPORT = 6000; - private static final String LOCALHOST = "127.0.0.1"; private Context parent = null; private vt320 buffer = null; private View view = null; private HostBean host = null; + private Uri uri = null; + private String target = null; private String init = null; private int start_line = 0; // monitor part of the screen for changes private int end_line = 500; // "" @@ -190,7 +191,7 @@ Log.i(TAG, "bound to service"); try { - InetAddress serverAddr = InetAddress.getByName(LOCALHOST); + InetAddress serverAddr = InetAddress.getByName(target); int tries = 0; while (tries < 10) { try { @@ -234,12 +235,14 @@ }; - public TerminalMonitor(Context parent, vt320 buffer, View view, HostBean host, String init) { + public TerminalMonitor(Context parent, vt320 buffer, View view, HostBean host, String url) { this.parent = parent; this.buffer = buffer; this.view = view; this.host = host; - this.init = init; + this.uri = Uri.parse(url); + this.target = uri.getHost(); + this.init = uri.getPath(); // setup the windows->android keymapping // http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731 keymap = new HashMap(); diff -r fbb1a98998fb -r 2cc170e3fc9b xml/510connectbot.in --- a/xml/510connectbot.in Thu Sep 12 16:08:16 2019 -0700 +++ b/xml/510connectbot.in Fri Oct 04 16:44:44 2019 -0700 @@ -29,7 +29,7 @@ - 2019-05-13 + 2019-10-04 Carl Byington @@ -104,7 +104,7 @@ - A deployment.connections text file is read (and deleted) on + A deployment.connections text file is read (and optionally deleted) on startup. This may be used to preconfigure the global options and to create an initial set of host connections. This is only useful for bulk deployments. @@ -179,9 +179,12 @@ - Any arguments that are keystrokes or characters are represented - as 16 bit unicode. Note that the first 256 such characters are - identical to the ISO-8859-1 latin character set. + Any arguments that are characters are represented as 16 bit + unicode. Note that the first 256 such characters are identical to the + ISO-8859-1 latin character set. There is no provision for handling + surrogate pairs as in UTF-16. Keystroke arguments (see DEPRESS) are + represented as Microsoft Virtual-Key codes, defined at + here. @@ -227,6 +230,22 @@ + Every SCREENCHANGE message from the TE will be followed by a + CURSORMOVE message. + + + + When the TE sends the screen contents as a result of a previous screen + watch, the screen watch area is then reset to the entire screen. The + voice application is then responsible for sending a screenwatch + command to set the watch area to something appropriate for that new + screen. Once the application has set the watch area to some part of a + single line, there is no mechanism for the application to reset it to + back to the entire screen. That reset only happens when the TE sends + the screen contents. + + + FIELDVALUE = 5 (TE -> Monitor). SETFIELD = 5 (Monitor -> TE). The first argument is the line number (0..23) @@ -237,6 +256,10 @@ When sent from the monitor to the emulator, this causes the emulator to send the field codes to the host (for async modes) or to set the specified field contents (for block modes). + If the field length is zero, the TE should move the cursor to the specified line/column. + + + This is also used as the reply message from the emulator to the monitor for a previous GETFIELD from the monitor. @@ -263,10 +286,15 @@ + Subsequent screenwatch requests replace the current one, so the TE + has only one watch area at any time. + + + DEPRESS = 8 (Monitor -> TE). The argument is a single uint16 value containing the vk_key value. This command causes the emulator to simulate a keypress for that key. The codes are defined - here. + here. @@ -291,7 +319,8 @@ SAYSTRING = 12 (TE -> Monitor). The first argument is nonzero if any current speech should be flushed. The second argument is nonzero if this speech should be synchronous. That is followed by uint16 - character codes to be spoken. + character codes to be spoken. Note that the language is specified + by the monitor, not the TE. @@ -331,7 +360,7 @@ - 2019-05-13 + 2019-10-04 Carl Byington @@ -407,6 +436,7 @@ fixed_size=true fixed_width=80 fixed_height=25 + monitor=socket://localhost/pub400 #