Lines Matching refs:Status

234                                 ? Status::FUNCTIONS_APPLIED  in getCurrentUsbFunctions()
235 : Status::FUNCTIONS_NOT_APPLIED); in getCurrentUsbFunctions()
243 V1_0::Status UsbGadget::tearDownGadget() { in tearDownGadget()
249 if (!WriteStringToFile("0", DEVICE_CLASS_PATH)) return Status::ERROR; in tearDownGadget()
251 if (!WriteStringToFile("0", DEVICE_SUB_CLASS_PATH)) return Status::ERROR; in tearDownGadget()
253 if (!WriteStringToFile("0", DEVICE_PROTOCOL_PATH)) return Status::ERROR; in tearDownGadget()
255 if (!WriteStringToFile("0", DESC_USE_PATH)) return Status::ERROR; in tearDownGadget()
257 if (unlinkFunctions(CONFIG_PATH)) return Status::ERROR; in tearDownGadget()
283 return Status::SUCCESS; in tearDownGadget()
299 static V1_0::Status setVidPid(const char *vid, const char *pid) { in setVidPid()
300 if (!WriteStringToFile(vid, VENDOR_ID_PATH)) return Status::ERROR; in setVidPid()
302 if (!WriteStringToFile(pid, PRODUCT_ID_PATH)) return Status::ERROR; in setVidPid()
304 return Status::SUCCESS; in setVidPid()
330 static V1_0::Status validateAndSetVidPid(uint64_t functions) { in validateAndSetVidPid()
331 V1_0::Status ret = Status::SUCCESS; in validateAndSetVidPid()
441 ret = Status::CONFIGURATION_NOT_SUPPORTED; in validateAndSetVidPid()
446 V1_0::Status UsbGadget::setupFunctions( in setupFunctions()
454 return Status::ERROR; in setupFunctions()
464 if (!WriteStringToFile("1", DESC_USE_PATH)) return Status::ERROR; in setupFunctions()
467 return Status::ERROR; in setupFunctions()
469 if (linkFunction("ffs.mtp", i++)) return Status::ERROR; in setupFunctions()
478 if (!WriteStringToFile("1", DESC_USE_PATH)) return Status::ERROR; in setupFunctions()
481 return Status::ERROR; in setupFunctions()
484 if (linkFunction("ffs.ptp", i++)) return Status::ERROR; in setupFunctions()
494 if (linkFunction("midi.gs5", i++)) return Status::ERROR; in setupFunctions()
499 if (linkFunction("accessory.gs2", i++)) return Status::ERROR; in setupFunctions()
504 if (linkFunction("audio_source.gs3", i++)) return Status::ERROR; in setupFunctions()
509 if (linkFunction("gsi.rndis", i++)) return Status::ERROR; in setupFunctions()
518 return Status::ERROR; in setupFunctions()
520 return Status::ERROR; in setupFunctions()
522 return Status::ERROR; in setupFunctions()
531 return Status::ERROR; in setupFunctions()
533 if (linkFunction("ffs.adb", i++)) return Status::ERROR; in setupFunctions()
541 if (!WriteStringToFile(GADGET_NAME, PULLUP_PATH)) return Status::ERROR; in setupFunctions()
544 callback->setCurrentUsbFunctionsCb(functions, Status::SUCCESS); in setupFunctions()
545 return Status::SUCCESS; in setupFunctions()
551 return Status::ERROR; in setupFunctions()
557 return Status::ERROR; in setupFunctions()
560 if (addEpollFd(epollFd, inotifyFd) == -1) return Status::ERROR; in setupFunctions()
562 if (addEpollFd(epollFd, eventFd) == -1) return Status::ERROR; in setupFunctions()
585 functions, gadgetPullup ? Status::SUCCESS : Status::ERROR); in setupFunctions()
590 return Status::SUCCESS; in setupFunctions()
602 V1_0::Status status = tearDownGadget(); in setCurrentUsbFunctions()
603 if (status != Status::SUCCESS) { in setCurrentUsbFunctions()
615 callback->setCurrentUsbFunctionsCb(functions, Status::SUCCESS); in setCurrentUsbFunctions()
624 if (status != Status::SUCCESS) { in setCurrentUsbFunctions()
629 if (status != Status::SUCCESS) { in setCurrentUsbFunctions()