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()
231 …if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && !strcmp(pExtra, … in ForwardPort()
236 outCmd->parameters = input + 9; in ForwardPort()
239 const char *p = input + 6; in ForwardPort()
253 outCmd->parameters = input; in ForwardPort()
258 string RunMode(const char *input, FormatCommand *outCmd) in RunMode() argument
262 outCmd->parameters = input + CMDSTR_TARGET_MODE.size() + 1; // with ' ' in RunMode()
270 int port = atoi(input + strlen("tmode port ")); in RunMode()
279 void TargetReboot(const char *input, FormatCommand *outCmd) in TargetReboot() argument
282 if (strcmp(input, CMDSTR_TARGET_REBOOT.c_str())) { in TargetReboot()
283 outCmd->parameters = input + 12; in TargetReboot()
296 string input = string(inputRaw, sizeInputRaw); in String2FormatCommand() local
297 if (!strncmp(input.c_str(), CMDSTR_SOFTWARE_HELP.c_str(), CMDSTR_SOFTWARE_HELP.size())) { in String2FormatCommand()
300 if (strstr(input.c_str(), " verbose")) { in String2FormatCommand()
305 } else if (!strcmp(input.c_str(), CMDSTR_SOFTWARE_VERSION.c_str())) { in String2FormatCommand()
309 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_DISCOVER.c_str())) { in String2FormatCommand()
311 … } else if (!strncmp(input.c_str(), CMDSTR_LIST_TARGETS.c_str(), CMDSTR_LIST_TARGETS.size())) { in String2FormatCommand()
313 if (strstr(input.c_str(), " -v")) { in String2FormatCommand()
316 … } else if (!strncmp(input.c_str(), CMDSTR_CHECK_SERVER.c_str(), CMDSTR_CHECK_SERVER.size())) { in String2FormatCommand()
318 … } else if (!strncmp(input.c_str(), CMDSTR_CHECK_DEVICE.c_str(), CMDSTR_CHECK_DEVICE.size())) { in String2FormatCommand()
319 outCmd->parameters = input.c_str() + CMDSTR_CHECK_DEVICE.size() + 1; // with ' ' in String2FormatCommand()
321 } else if (!strncmp(input.c_str(), CMDSTR_WAIT_FOR.c_str(), CMDSTR_WAIT_FOR.size())) { in String2FormatCommand()
323 } else if (!strcmp(input.c_str(), CMDSTR_CONNECT_ANY.c_str())) { in String2FormatCommand()
325 … } else if (!strncmp(input.c_str(), CMDSTR_CONNECT_TARGET.c_str(), CMDSTR_CONNECT_TARGET.size())) { in String2FormatCommand()
326 outCmd->parameters = input.c_str() + CMDSTR_CONNECT_TARGET.size() + 1; // with ' ' in String2FormatCommand()
328 } else if (!strncmp(input.c_str(), (CMDSTR_SHELL + " ").c_str(), CMDSTR_SHELL.size() + 1)) { in String2FormatCommand()
330 outCmd->parameters = input.c_str() + CMDSTR_SHELL.size() + 1; in String2FormatCommand()
331 } else if (!strcmp(input.c_str(), CMDSTR_SHELL.c_str())) { in String2FormatCommand()
333 } else if (!strncmp(input.c_str(), CMDSTR_FILE_SEND.c_str(), CMDSTR_FILE_SEND.size()) || in String2FormatCommand()
334 !strncmp(input.c_str(), CMDSTR_FILE_RECV.c_str(), CMDSTR_FILE_RECV.size())) { in String2FormatCommand()
336 outCmd->parameters = Base::UnicodeToUtf8(input.c_str() + strlen("file ")); in String2FormatCommand()
337 …} else if (!strncmp(input.c_str(), string(CMDSTR_FORWARD_FPORT + " ").c_str(), CMDSTR_FORWARD_FPOR… in String2FormatCommand()
338 || !strncmp(input.c_str(), string(CMDSTR_FORWARD_RPORT + " ").c_str(), in String2FormatCommand()
340 stringError = ForwardPort(input.c_str(), outCmd); in String2FormatCommand()
341 } else if (!strcmp(input.c_str(), CMDSTR_KILL_SERVER.c_str())) { in String2FormatCommand()
343 } else if (!strcmp(input.c_str(), CMDSTR_KILL_DAEMON.c_str())) { in String2FormatCommand()
346 } else if (!strncmp(input.c_str(), CMDSTR_APP_INSTALL.c_str(), CMDSTR_APP_INSTALL.size())) { in String2FormatCommand()
348 outCmd->parameters = input; in String2FormatCommand()
349 … } else if (!strncmp(input.c_str(), CMDSTR_APP_UNINSTALL.c_str(), CMDSTR_APP_UNINSTALL.size())) { in String2FormatCommand()
351 outCmd->parameters = input; in String2FormatCommand()
356 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_MOUNT.c_str())) { in String2FormatCommand()
358 } else if (!strcmp(input.c_str(), CMDSTR_LIST_JDWP.c_str())) { in String2FormatCommand()
360 } else if (!strncmp(input.c_str(), CMDSTR_TRACK_JDWP.c_str(), CMDSTR_TRACK_JDWP.size())) { in String2FormatCommand()
362 if (strstr(input.c_str(), " -p")) { in String2FormatCommand()
365 … } else if (!strncmp(input.c_str(), CMDSTR_TARGET_REBOOT.c_str(), CMDSTR_TARGET_REBOOT.size())) { in String2FormatCommand()
366 TargetReboot(input.c_str(), outCmd); in String2FormatCommand()
367 } else if (!strncmp(input.c_str(), CMDSTR_TARGET_MODE.c_str(), CMDSTR_TARGET_MODE.size())) { in String2FormatCommand()
368 stringError = RunMode(input.c_str(), outCmd); in String2FormatCommand()
369 } else if (!strncmp(input.c_str(), CMDSTR_HILOG.c_str(), CMDSTR_HILOG.size())) { in String2FormatCommand()
371 if (strstr(input.c_str(), " -h")) { in String2FormatCommand()
374 … } else if (!strncmp(input.c_str(), CMDSTR_STARTUP_MODE.c_str(), CMDSTR_STARTUP_MODE.size())) { in String2FormatCommand()
376 if (strstr(input.c_str(), " -r")) { in String2FormatCommand()
379 … } else if (!strncmp(input.c_str(), CMDSTR_APP_SIDELOAD.c_str(), CMDSTR_APP_SIDELOAD.size())) { in String2FormatCommand()
380 if (strlen(input.c_str()) == CMDSTR_APP_SIDELOAD.size()) { in String2FormatCommand()
385 outCmd->parameters = input; in String2FormatCommand()
386 } else if (!strncmp(input.c_str(), CMDSTR_BUGREPORT.c_str(), CMDSTR_BUGREPORT.size())) { in String2FormatCommand()
388 outCmd->parameters = input; in String2FormatCommand()
394 …else if (!strncmp(input.c_str(), CMDSTR_INNER_ENABLE_KEEPALIVE.c_str(), CMDSTR_INNER_ENABLE_KEEPAL… in String2FormatCommand()
396 } else if (HostUpdater::CheckMatchUpdate(input, *outCmd)) { in String2FormatCommand()
397 outCmd->parameters = input; in String2FormatCommand()