• Home
  • Raw
  • Download

Lines Matching refs:hSession

160     HSession hSession = hdcServer->MallocSession(true, CONN_USB, this);  in DetectMyNeed()  local
161 hSession->connectKey = hUSB->serialNumber; in DetectMyNeed()
169 waitTimeDoCmd->data = hSession; in DetectMyNeed()
176 void HdcHostUSB::KickoutZombie(HSession hSession) in KickoutZombie() argument
178 HdcServer *ptrConnect = (HdcServer *)hSession->classInstance; in KickoutZombie()
179 HUSB hUSB = hSession->hUSB; in KickoutZombie()
181 … WRITE_LOG(LOG_WARN, "KickoutZombie devHandle:%p isDead:%d", hUSB->devHandle, hSession->isDead); in KickoutZombie()
188 ptrConnect->FreeSession(hSession->sessionId); in KickoutZombie()
316 void HdcHostUSB::UpdateUSBDaemonInfo(HUSB hUSB, HSession hSession, uint8_t connStatus) in UpdateUSBDaemonInfo() argument
324 di.hSession = hSession; in UpdateUSBDaemonInfo()
423 void HdcHostUSB::CancelUsbIo(HSession hSession) in CancelUsbIo() argument
425 WRITE_LOG(LOG_DEBUG, "HostUSB CancelUsbIo, ref:%u", uint32_t(hSession->ref)); in CancelUsbIo()
426 HUSB hUSB = hSession->hUSB; in CancelUsbIo()
450 HSession hSession = (HSession)stream->data; in UsbToHdcProtocol() local
451 unsigned int fd = hSession->dataFd[STREAM_MAIN]; in UsbToHdcProtocol()
523 int HdcHostUSB::SubmitUsbBio(HSession hSession, bool sendOrRecv, uint8_t *buf, int bufSize) in SubmitUsbBio() argument
525 HUSB hUSB = hSession->hUSB; in SubmitUsbBio()
560 void HdcHostUSB::BeginUsbRead(HSession hSession) in BeginUsbRead() argument
562 HUSB hUSB = hSession->hUSB; in BeginUsbRead()
565 ++hSession->ref; in BeginUsbRead()
567 std::thread([this, hSession, hUSB]() { in BeginUsbRead()
570 while (!hSession->isDead) { in BeginUsbRead()
574 childRet = SubmitUsbBio(hSession, false, hUSB->hostBulkIn.buf, nextReadSize); in BeginUsbRead()
579 …childRet = SendToHdcStream(hSession, reinterpret_cast<uv_stream_t *>(&hSession->dataPipe[STREAM_MA… in BeginUsbRead()
586 --hSession->ref; in BeginUsbRead()
589 server->FreeSession(hSession->sessionId); in BeginUsbRead()
623 int HdcHostUSB::SendUSBRaw(HSession hSession, uint8_t *data, const int length) in SendUSBRaw() argument
626 HdcSessionBase *server = reinterpret_cast<HdcSessionBase *>(hSession->classInstance); in SendUSBRaw()
627 ++hSession->ref; in SendUSBRaw()
628 ret = SubmitUsbBio(hSession, true, data, length); in SendUSBRaw()
631 CancelUsbIo(hSession); in SendUSBRaw()
632 hSession->hUSB->hostBulkOut.isShutdown = true; in SendUSBRaw()
633 server->FreeSession(hSession->sessionId); in SendUSBRaw()
635 --hSession->ref; in SendUSBRaw()
688 bool HdcHostUSB::ReadyForWorkThread(HSession hSession) in ReadyForWorkThread() argument
690 HdcUSBBase::ReadyForWorkThread(hSession); in ReadyForWorkThread()
695 HSession HdcHostUSB::ConnectDetectDaemon(const HSession hSession, const HDaemonInfo pdi) in ConnectDetectDaemon() argument
698 HUSB hUSB = hSession->hUSB; in ConnectDetectDaemon()
702 pServer->FreeSession(hSession->sessionId); in ConnectDetectDaemon()
705 UpdateUSBDaemonInfo(hUSB, hSession, STATUS_CONNECTED); in ConnectDetectDaemon()
706 BeginUsbRead(hSession); in ConnectDetectDaemon()
710 …:StartWorkThread(&pServer->loopMain, pServer->SessionWorkThread, Base::FinishWorkThread, hSession); in ConnectDetectDaemon()
712 while (hSession->childLoop.active_handles == 0) { in ConnectDetectDaemon()
716 Base::SendToPollFd(hSession->ctrlFd[STREAM_MAIN], ctrl.data(), ctrl.size()); in ConnectDetectDaemon()
717 return hSession; in ConnectDetectDaemon()