diff src/com/five_ten_sg/connectbot/monitor/MonitorService.java @ 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 5bf6d84cc5b8
children a94ca5a89fe8
line wrap: on
line diff
--- 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);
+        }
+    }
+
 }