Lines Matching refs:input
227 string ForwardPort(const char *input, FormatCommand *outCmd) in ForwardPort() argument
230 const char *pExtra = input + 6; // CMDSTR_FORWARD_FPORT CMDSTR_FORWARD_RPORT + " " size in ForwardPort()
236 outCmd->parameters = input + 9; in ForwardPort()
239 const char *p = input + 6; in ForwardPort()
248 outCmd->parameters = input; in ForwardPort()
253 string RunMode(const char *input, FormatCommand *outCmd) in RunMode() argument
257 outCmd->parameters = input + CMDSTR_TARGET_MODE.size() + 1; // with ' ' in RunMode()
265 int port = atoi(input + strlen("tmode port ")); in RunMode()
274 void TargetReboot(const char *input, FormatCommand *outCmd) in TargetReboot() argument
277 if (strcmp(input, CMDSTR_TARGET_REBOOT.c_str())) { in TargetReboot()
278 outCmd->parameters = input + 12; in TargetReboot()
291 string input = string(inputRaw, sizeInputRaw); in String2FormatCommand() local
292 if (!strncmp(input.c_str(), CMDSTR_SOFTWARE_HELP.c_str(), CMDSTR_SOFTWARE_HELP.size())) { in String2FormatCommand()
295 if (strstr(input.c_str(), " verbose")) { in String2FormatCommand()
300 } else if (!strcmp(input.c_str(), CMDSTR_SOFTWARE_VERSION.c_str())) { in String2FormatCommand()
304 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_DISCOVER.c_str())) { in String2FormatCommand()
306 … } else if (!strncmp(input.c_str(), CMDSTR_LIST_TARGETS.c_str(), CMDSTR_LIST_TARGETS.size())) { in String2FormatCommand()
308 if (strstr(input.c_str(), " -v")) { in String2FormatCommand()
311 … } else if (!strncmp(input.c_str(), CMDSTR_CHECK_SERVER.c_str(), CMDSTR_CHECK_SERVER.size())) { in String2FormatCommand()
313 … } else if (!strncmp(input.c_str(), CMDSTR_CHECK_DEVICE.c_str(), CMDSTR_CHECK_DEVICE.size())) { in String2FormatCommand()
314 outCmd->parameters = input.c_str() + CMDSTR_CHECK_DEVICE.size() + 1; // with ' ' in String2FormatCommand()
316 } else if (!strncmp(input.c_str(), CMDSTR_WAIT_FOR.c_str(), CMDSTR_WAIT_FOR.size())) { in String2FormatCommand()
318 } else if (!strcmp(input.c_str(), CMDSTR_CONNECT_ANY.c_str())) { in String2FormatCommand()
320 … } else if (!strncmp(input.c_str(), CMDSTR_CONNECT_TARGET.c_str(), CMDSTR_CONNECT_TARGET.size())) { in String2FormatCommand()
321 outCmd->parameters = input.c_str() + CMDSTR_CONNECT_TARGET.size() + 1; // with ' ' in String2FormatCommand()
323 } else if (!strncmp(input.c_str(), (CMDSTR_SHELL + " ").c_str(), CMDSTR_SHELL.size() + 1)) { in String2FormatCommand()
325 outCmd->parameters = input.c_str() + CMDSTR_SHELL.size() + 1; in String2FormatCommand()
326 } else if (!strcmp(input.c_str(), CMDSTR_SHELL.c_str())) { in String2FormatCommand()
328 } else if (!strncmp(input.c_str(), CMDSTR_FILE_SEND.c_str(), CMDSTR_FILE_SEND.size()) || in String2FormatCommand()
329 !strncmp(input.c_str(), CMDSTR_FILE_RECV.c_str(), CMDSTR_FILE_RECV.size())) { in String2FormatCommand()
331 outCmd->parameters = Base::UnicodeToUtf8(input.c_str() + strlen("file ")); in String2FormatCommand()
332 …} else if (!strncmp(input.c_str(), string(CMDSTR_FORWARD_FPORT + " ").c_str(), CMDSTR_FORWARD_FPOR… in String2FormatCommand()
333 || !strncmp(input.c_str(), string(CMDSTR_FORWARD_RPORT + " ").c_str(), in String2FormatCommand()
335 stringError = ForwardPort(input.c_str(), outCmd); in String2FormatCommand()
336 } else if (!strcmp(input.c_str(), CMDSTR_KILL_SERVER.c_str())) { in String2FormatCommand()
338 } else if (!strcmp(input.c_str(), CMDSTR_KILL_DAEMON.c_str())) { in String2FormatCommand()
341 } else if (!strncmp(input.c_str(), CMDSTR_APP_INSTALL.c_str(), CMDSTR_APP_INSTALL.size())) { in String2FormatCommand()
343 outCmd->parameters = input; in String2FormatCommand()
344 … } else if (!strncmp(input.c_str(), CMDSTR_APP_UNINSTALL.c_str(), CMDSTR_APP_UNINSTALL.size())) { in String2FormatCommand()
346 outCmd->parameters = input; in String2FormatCommand()
351 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_MOUNT.c_str())) { in String2FormatCommand()
353 } else if (!strcmp(input.c_str(), CMDSTR_LIST_JDWP.c_str())) { in String2FormatCommand()
355 } else if (!strcmp(input.c_str(), CMDSTR_TRACK_JDWP.c_str())) { in String2FormatCommand()
357 … } else if (!strncmp(input.c_str(), CMDSTR_TARGET_REBOOT.c_str(), CMDSTR_TARGET_REBOOT.size())) { in String2FormatCommand()
358 TargetReboot(input.c_str(), outCmd); in String2FormatCommand()
359 } else if (!strncmp(input.c_str(), CMDSTR_TARGET_MODE.c_str(), CMDSTR_TARGET_MODE.size())) { in String2FormatCommand()
360 stringError = RunMode(input.c_str(), outCmd); in String2FormatCommand()
361 } else if (!strncmp(input.c_str(), CMDSTR_HILOG.c_str(), CMDSTR_HILOG.size())) { in String2FormatCommand()
363 if (strstr(input.c_str(), " -h")) { in String2FormatCommand()
366 … } else if (!strncmp(input.c_str(), CMDSTR_STARTUP_MODE.c_str(), CMDSTR_STARTUP_MODE.size())) { in String2FormatCommand()
368 if (strstr(input.c_str(), " -r")) { in String2FormatCommand()
371 … } else if (!strncmp(input.c_str(), CMDSTR_APP_SIDELOAD.c_str(), CMDSTR_APP_SIDELOAD.size())) { in String2FormatCommand()
372 if (strlen(input.c_str()) == CMDSTR_APP_SIDELOAD.size()) { in String2FormatCommand()
377 outCmd->parameters = input; in String2FormatCommand()
378 } else if (!strncmp(input.c_str(), CMDSTR_BUGREPORT.c_str(), CMDSTR_BUGREPORT.size())) { in String2FormatCommand()
380 outCmd->parameters = input; in String2FormatCommand()
386 …else if (!strncmp(input.c_str(), CMDSTR_INNER_ENABLE_KEEPALIVE.c_str(), CMDSTR_INNER_ENABLE_KEEPAL… in String2FormatCommand()
388 } else if (HostUpdater::CheckMatchUpdate(input, *outCmd)) { in String2FormatCommand()
389 outCmd->parameters = input; in String2FormatCommand()