//连接设备 public static void callConnect(String batPath, String device, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try{ myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { device }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_START_CONNECT); myThread.start(); }catch (Exception e) { } }
//获取当前连接的设备 public static void getDevices(String batPath, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try { myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] {}), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_GET_DEVICES); myThread.start(); } catch (Exception e) { } }
//连接vpn public static void callConnectVpn(String batPath, String vpnName, String userName, String userPassword, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try { myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { vpnName, userName, userPassword }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_CONNECT_VPN); myThread.start(); } catch (Exception e) { } }
public static void callDeleteRandomFile(String batPath, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try { myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_DELETE_RANDOM); myThread.start(); } catch (Exception e) { } }
public static void callPullTimeFile(String batPath, String targetPath, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try { myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { targetPath }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_PULL_TIME); myThread.start(); } catch (Exception e) { } }
//启动修改prop public static void callProp(String batPath, String device, String propPath, OnProcessListener onProcessListener) { if (onProcessListener == null) { return; } try { myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { device, propPath }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_CHANGE_PROP); myThread.start(); } catch (Exception e) { } }