Lines Matching refs:input

236     string ForwardPort(const char *input, FormatCommand *outCmd)
239 const char *pExtra = input + 6; // CMDSTR_FORWARD_FPORT CMDSTR_FORWARD_RPORT + " " size
240 if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && !strcmp(pExtra, "ls")) {
242 } else if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) &&
246 outCmd->parameters = input + FORWORD_PORT_RM_BUF_SIZE;
249 const char *p = input + FORWORD_PORT_OTHER_BUF_SIZE;
263 outCmd->parameters = input;
268 string RunMode(const char *input, FormatCommand *outCmd)
272 outCmd->parameters = input + CMDSTR_TARGET_MODE.size() + 1; // with ' '
280 const char *tmp = input + strlen("tmode port ");
294 void TargetReboot(const char *input, FormatCommand *outCmd)
297 if (strcmp(input, CMDSTR_TARGET_REBOOT.c_str())) {
298 outCmd->parameters = input + CMDSTR_TARGET_REBOOT.size() + 1; // with ' '
306 // command input
311 string input = string(inputRaw, sizeInputRaw);
312 if (!strncmp(input.c_str(), CMDSTR_SOFTWARE_HELP.c_str(), CMDSTR_SOFTWARE_HELP.size())) {
315 if (strstr(input.c_str(), " verbose")) {
320 } else if (!strcmp(input.c_str(), CMDSTR_SOFTWARE_VERSION.c_str())) {
324 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_DISCOVER.c_str())) {
326 } else if (!strncmp(input.c_str(), CMDSTR_LIST_TARGETS.c_str(), CMDSTR_LIST_TARGETS.size())) {
328 if (strstr(input.c_str(), " -v")) {
331 } else if (!strncmp(input.c_str(), CMDSTR_CHECK_SERVER.c_str(), CMDSTR_CHECK_SERVER.size())) {
333 } else if (!strncmp(input.c_str(), CMDSTR_CHECK_DEVICE.c_str(), CMDSTR_CHECK_DEVICE.size())) {
334 outCmd->parameters = input.c_str() + CMDSTR_CHECK_DEVICE.size() + 1; // with ' '
336 } else if (!strncmp(input.c_str(), CMDSTR_WAIT_FOR.c_str(), CMDSTR_WAIT_FOR.size())) {
338 } else if (!strcmp(input.c_str(), CMDSTR_CONNECT_ANY.c_str())) {
340 } else if (!strncmp(input.c_str(), CMDSTR_CONNECT_TARGET.c_str(), CMDSTR_CONNECT_TARGET.size())) {
341 outCmd->parameters = input.c_str() + CMDSTR_CONNECT_TARGET.size() + 1; // with ' '
343 } else if (!strncmp(input.c_str(), (CMDSTR_SHELL + " ").c_str(), CMDSTR_SHELL.size() + 1)) {
345 outCmd->parameters = input.c_str() + CMDSTR_SHELL.size() + 1;
346 } else if (!strcmp(input.c_str(), CMDSTR_SHELL.c_str())) {
348 } else if (!strncmp(input.c_str(), CMDSTR_FILE_SEND.c_str(), CMDSTR_FILE_SEND.size()) ||
349 !strncmp(input.c_str(), CMDSTR_FILE_RECV.c_str(), CMDSTR_FILE_RECV.size())) {
351 outCmd->parameters = input.c_str() + strlen("file ");
352 } else if (!strncmp(input.c_str(), string(CMDSTR_FORWARD_FPORT + " ").c_str(), CMDSTR_FORWARD_FPORT.size() + 1)
353 || !strncmp(input.c_str(), string(CMDSTR_FORWARD_RPORT + " ").c_str(),
355 stringError = ForwardPort(input.c_str(), outCmd);
356 } else if (!strncmp(input.c_str(), CMDSTR_APP_INSTALL.c_str(), CMDSTR_APP_INSTALL.size())) {
358 outCmd->parameters = input;
359 } else if (!strncmp(input.c_str(), CMDSTR_APP_UNINSTALL.c_str(), CMDSTR_APP_UNINSTALL.size())) {
361 outCmd->parameters = input;
366 } else if (!strcmp(input.c_str(), CMDSTR_TARGET_MOUNT.c_str())) {
368 } else if (!strcmp(input.c_str(), CMDSTR_LIST_JDWP.c_str())) {
370 } else if (!strncmp(input.c_str(), CMDSTR_TRACK_JDWP.c_str(), CMDSTR_TRACK_JDWP.size())) {
372 if (strstr(input.c_str(), " -p")) {
374 } else if (strstr(input.c_str(), " -a")) {
377 } else if (!strncmp(input.c_str(), CMDSTR_TARGET_REBOOT.c_str(), CMDSTR_TARGET_REBOOT.size())) {
378 TargetReboot(input.c_str(), outCmd);
379 } else if (!strncmp(input.c_str(), CMDSTR_TARGET_MODE.c_str(), CMDSTR_TARGET_MODE.size())) {
380 stringError = RunMode(input.c_str(), outCmd);
381 } else if (!strncmp(input.c_str(), CMDSTR_HILOG.c_str(), CMDSTR_HILOG.size())) {
383 if (strstr(input.c_str(), " -h")) {
386 } else if (!strncmp(input.c_str(), CMDSTR_STARTUP_MODE.c_str(), CMDSTR_STARTUP_MODE.size())) {
388 if (strstr(input.c_str(), " -r")) {
391 } else if (!strncmp(input.c_str(), CMDSTR_APP_SIDELOAD.c_str(), CMDSTR_APP_SIDELOAD.size())) {
392 if (strlen(input.c_str()) == CMDSTR_APP_SIDELOAD.size()) {
397 outCmd->parameters = input;
398 } else if (!strncmp(input.c_str(), CMDSTR_BUGREPORT.c_str(), CMDSTR_BUGREPORT.size())) {
400 outCmd->parameters = input;
401 if (outCmd->parameters.size() == CMDSTR_BUGREPORT.size() + 1) { // 1 is sizeInputRaw = input.size() + 1
406 else if (!strncmp(input.c_str(), CMDSTR_INNER_ENABLE_KEEPALIVE.c_str(), CMDSTR_INNER_ENABLE_KEEPALIVE.size())) {
408 } else if (HostUpdater::CheckMatchUpdate(input, *outCmd)) {
409 outCmd->parameters = input;