changeset 16:a481d8fb5571 stable-1.0.2

add switch session command to the TE
author Carl Byington <carl@five-ten-sg.com>
date Tue, 01 Jul 2014 19:08:47 -0700
parents 357bbbbcf201
children cc4da730e429
files AndroidManifest.xml src/com/five_ten_sg/connectbot/monitor/MonitorService.java xml/510connectbotmonitor.in
diffstat 3 files changed, 27 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/AndroidManifest.xml	Sun Jun 29 12:43:35 2014 -0700
+++ b/AndroidManifest.xml	Tue Jul 01 19:08:47 2014 -0700
@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.five_ten_sg.connectbot.monitor"
     android:versionCode="1"
-    android:versionName="1.0.1-1" >
+    android:versionName="1.0.2-1" >
 
     <uses-sdk
         android:minSdkVersion="8"
--- a/src/com/five_ten_sg/connectbot/monitor/MonitorService.java	Sun Jun 29 12:43:35 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/monitor/MonitorService.java	Tue Jul 01 19:08:47 2014 -0700
@@ -32,17 +32,18 @@
 public class MonitorService extends Service implements OnInitListener {
     public final static String TAG = "ConnectBot.MonitorService";
 
-    public  static final char MONITOR_CMD_INIT         = 0;
-    public  static final char MONITOR_CMD_ACTIVATE     = 1;
-    public  static final char MONITOR_CMD_KEYSTATE     = 2;
-    public  static final char MONITOR_CMD_CURSORMOVE   = 3;
-    public  static final char MONITOR_CMD_SCREENCHANGE = 4;
-    public  static final char MONITOR_CMD_FIELDVALUE   = 5;
-    public  static final char MONITOR_CMD_SETFIELD     = 5;
-    public  static final char MONITOR_CMD_GETFIELD     = 6;
-    public  static final char MONITOR_CMD_SCREENWATCH  = 7;
-    public  static final char MONITOR_CMD_DEPRESS      = 8;
-    public  static final char MONITOR_CMD_SHOWURL      = 9;
+    public  static final char MONITOR_CMD_INIT          = 0;
+    public  static final char MONITOR_CMD_ACTIVATE      = 1;
+    public  static final char MONITOR_CMD_KEYSTATE      = 2;
+    public  static final char MONITOR_CMD_CURSORMOVE    = 3;
+    public  static final char MONITOR_CMD_SCREENCHANGE  = 4;
+    public  static final char MONITOR_CMD_FIELDVALUE    = 5;
+    public  static final char MONITOR_CMD_SETFIELD      = 5;
+    public  static final char MONITOR_CMD_GETFIELD      = 6;
+    public  static final char MONITOR_CMD_SCREENWATCH   = 7;
+    public  static final char MONITOR_CMD_DEPRESS       = 8;
+    public  static final char MONITOR_CMD_SHOWURL       = 9;
+    public  static final char MONITOR_CMD_SWITCHSESSION = 10;
 
     public static final int       MONITORPORT = 6000;
     public static ConcurrentHashMap<Integer,CommunicationThread> clients = new ConcurrentHashMap<Integer,CommunicationThread>();
@@ -440,4 +441,12 @@
         }
     }
 
+    public static void teSwitchSession(int connection) {
+        CommunicationThread cm = clients.get(connection);
+        if (cm != null) {
+            char [] arg2 = new char[2];
+            cm.clientWrite(MONITOR_CMD_SWITCHSESSION, arg2);
+        }
+    }
+
 }
--- a/xml/510connectbotmonitor.in	Sun Jun 29 12:43:35 2014 -0700
+++ b/xml/510connectbotmonitor.in	Tue Jul 01 19:08:47 2014 -0700
@@ -19,7 +19,7 @@
 
     <refentry id="x@PACKAGE@.1">
         <refentryinfo>
-            <date>2014-06-22</date>
+            <date>2014-07-01</date>
             <author>
                 <firstname>Carl</firstname>
                 <surname>Byington</surname>
@@ -171,6 +171,11 @@
                 SHOWURL = 9 (Monitor -> TE). The single argument is a sequence
                 of uint16 character codes forming a URL to be displayed.
             </para>
+
+            <para>
+                SWITCHSESSION = 10 (Monitor -> TE). There are no arguments. The TE
+                should display this session.
+            </para>
         </refsect1>
 
         <refsect1 id='todo.1'>