diff src/com/five_ten_sg/connectbot/monitor/MonitorService.java @ 13:5bf6d84cc5b8 stable-1.0.1

add showurl command
author Carl Byington <carl@five-ten-sg.com>
date Tue, 24 Jun 2014 07:58:13 -0700
parents 992dca085fa2
children a481d8fb5571
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/monitor/MonitorService.java	Tue Jun 24 07:41:39 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/monitor/MonitorService.java	Tue Jun 24 07:58:13 2014 -0700
@@ -42,6 +42,7 @@
     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 int       MONITORPORT = 6000;
     public static ConcurrentHashMap<Integer,CommunicationThread> clients = new ConcurrentHashMap<Integer,CommunicationThread>();
@@ -427,4 +428,16 @@
             cm.clientWrite(MONITOR_CMD_DEPRESS, arg);
         }
     }
+
+    public static void teShowUrl(int connection, char [] url) {
+        int len = url.length;
+        CommunicationThread cm = clients.get(connection);
+        if (cm != null) {
+            char[] arg2 = new char[2 + len];
+            int base = 2;
+            System.arraycopy(url, 0, arg2, base, len);
+            cm.clientWrite(MONITOR_CMD_SHOWURL, arg2);
+        }
+    }
+
 }