comparison src/com/five_ten_sg/connectbot/service/TerminalMonitor.java @ 205:f86f1e37b504

add cursor request command to the TE
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Jul 2014 08:46:25 -0700
parents 6e07ea418b90
children af235340fcde
comparison
equal deleted inserted replaced
204:aab87298244f 205:f86f1e37b504
37 public static final char MONITOR_CMD_GETFIELD = 6; 37 public static final char MONITOR_CMD_GETFIELD = 6;
38 public static final char MONITOR_CMD_SCREENWATCH = 7; 38 public static final char MONITOR_CMD_SCREENWATCH = 7;
39 public static final char MONITOR_CMD_DEPRESS = 8; 39 public static final char MONITOR_CMD_DEPRESS = 8;
40 public static final char MONITOR_CMD_SHOWURL = 9; 40 public static final char MONITOR_CMD_SHOWURL = 9;
41 public static final char MONITOR_CMD_SWITCHSESSION = 10; 41 public static final char MONITOR_CMD_SWITCHSESSION = 10;
42 public static final char MONITOR_CMD_CURSORREQUEST = 11;
42 43
43 private static final int MONITORPORT = 6000; 44 private static final int MONITORPORT = 6000;
44 private static final String LOCALHOST = "127.0.0.1"; 45 private static final String LOCALHOST = "127.0.0.1";
45 46
46 private Context parent = null; 47 private Context parent = null;
137 break; 138 break;
138 139
139 case MONITOR_CMD_SWITCHSESSION: 140 case MONITOR_CMD_SWITCHSESSION:
140 if (packet.length == 1) 141 if (packet.length == 1)
141 switchSession(); 142 switchSession();
143
144 break;
145
146 case MONITOR_CMD_CURSORREQUEST:
147 if (packet.length == 1)
148 cursorRequest();
142 149
143 break; 150 break;
144 151
145 default: 152 default:
146 break; 153 break;
445 intent.setAction(Intent.ACTION_VIEW); 452 intent.setAction(Intent.ACTION_VIEW);
446 intent.setData(host.getUri()); 453 intent.setData(host.getUri());
447 parent.startActivity(intent); 454 parent.startActivity(intent);
448 } 455 }
449 456
457
458 public synchronized void cursorRequest() {
459 Log.i(TAG, "cursorRequest()");
460 testChanged();
461 }
462
450 } 463 }