Lines Matching refs:service

71     forEachServiceEntry([&] (const HidlService *service) {  in forEachExistingService()  argument
72 if (service->getService() == nullptr) { in forEachExistingService()
75 return f(service); in forEachExistingService()
80 forEachServiceEntry([&] (HidlService *service) { in forEachExistingService() argument
81 if (service->getService() == nullptr) { in forEachExistingService()
84 return f(service); in forEachExistingService()
178 std::unique_ptr<HidlService> &&service) { in insertService() argument
179 mInstanceMap.insert({service->getInstanceName(), std::move(service)}); in insertService()
200 const std::unique_ptr<HidlService> &service = instanceMapping.second; in addPackageListener() local
202 if (service->getService() == nullptr) { in addPackageListener()
207 service->getInterfaceName(), in addPackageListener()
208 service->getInstanceName(), in addPackageListener()
211 LOG(ERROR) << "Not adding package listener for " << service->getInterfaceName() in addPackageListener()
212 << "/" << service->getInstanceName() << ": transport error " in addPackageListener()
239 const std::unique_ptr<HidlService> &service = servicePair.second; in removeServiceListener() local
240 found |= service->removeListener(who); in removeServiceListener()
278 sp<IBase> service = hidlService->getService(); in get() local
279 if (service == nullptr) { in get()
288 if (otherService != hidlService && interfacesEqual(service, otherService->getService())) { in get()
303 return service; in get()
306 Return<bool> ServiceManager::add(const hidl_string& name, const sp<IBase>& service) { in add() argument
309 if (service == nullptr) { in add()
315 auto ret = service->interfaceChain([&](const auto &interfaceChain) { in add()
316 addSuccess = addImpl(name, service, interfaceChain, pidcon); in add()
328 const sp<IBase>& service, in addImpl() argument
393 std::make_unique<HidlService>(fqName, name, service, callingContext.pid)); in addImpl()
395 hidlService->setService(service, callingContext.pid); in addImpl()
401 bool linkRet = service->linkToDeath(this, kServiceDiedCookie).withDefault(false); in addImpl()
439 forEachExistingService([&] (const HidlService *service) { in list() argument
440 list[idx++] = service->string(); in list()
467 const std::unique_ptr<HidlService> &service = serviceMapping.second; in listByInterface() local
468 if (service->getService() == nullptr) continue; in listByInterface()
476 const std::unique_ptr<HidlService> &service = serviceMapping.second; in listByInterface() local
477 if (service->getService() == nullptr) continue; in listByInterface()
479 list[idx++] = service->getInstanceName(); in listByInterface()
509 HidlService *service = ifaceMap.lookup(name); in registerForNotifications() local
517 if (service == nullptr) { in registerForNotifications()
522 service->addListener(callback); in registerForNotifications()
555 HidlService *service = ifaceMap.lookup(name); in unregisterForNotifications() local
557 if (service == nullptr) { in unregisterForNotifications()
561 return service->removeListener(callback); in unregisterForNotifications()
592 sp<IBase> service = registered->getService(); in registerClientCallback() local
594 if (!interfacesEqual(service, server)) { in registerClientCallback()
620 forEachExistingService([&] (HidlService *service) { in unregisterClientCallback() argument
621 if (server == nullptr || interfacesEqual(service->getService(), server)) { in unregisterClientCallback()
622 removed |= service->removeClientCallback(cb); in unregisterClientCallback()
631 forEachServiceEntry([&] (HidlService *service) { in handleClientCallbacks() argument
633 service->handleClientCallbacks(true /* isCalledOnInterval */, 1 /*knownClientCount*/); in handleClientCallbacks()
639 const sp<IBase>& service, in addWithChain() argument
641 if (service == nullptr) { in addWithChain()
647 return addImpl(name, service, chain, callingContext); in addWithChain()
666 const sp<IBase>& service) { in tryUnregister() argument
670 if (service == nullptr) { in tryUnregister()
690 if (!interfacesEqual(service, server)) { in tryUnregister()
709 bool success = removeService(service, &name /*restrictToInstanceName*/); in tryUnregister()
726 forEachServiceEntry([&] (const HidlService *service) { in debugDump() argument
728 clientPids.resize(service->getPassthroughClients().size()); in debugDump()
731 for (pid_t p : service->getPassthroughClients()) { in debugDump()
736 .interfaceName = service->getInterfaceName(), in debugDump()
737 .instanceName = service->getInstanceName(), in debugDump()
738 .pid = service->getDebugPid(), in debugDump()
771 HidlService *service = ifaceMap.lookup(name); in registerPassthroughClient() local
773 if (service == nullptr) { in registerPassthroughClient()
778 service->registerPassthroughClient(callingContext.pid); in registerPassthroughClient()
791 const std::unique_ptr<HidlService> &service = servicePair.second; in removeService() local
793 if (interfacesEqual(service->getService(), who.promote())) { in removeService()
801service->setService(nullptr, static_cast<pid_t>(IServiceManager::PidConstant::NO_PID)); in removeService()