/drivers/hdf_core/framework/sample/platform/uart/dispatch/ |
H A D | uart_if.c | 20 char *serviceName = NULL; in UartOpen() local 28 serviceName = (char *)OsalMemCalloc(sizeof(char) * (MAX_DEV_NAME_SIZE + 1)); in UartOpen() 29 if (serviceName == NULL) { in UartOpen() 30 HDF_LOGE("Failed to OsalMemCalloc serviceName"); in UartOpen() 34 ret = snprintf_s(serviceName, MAX_DEV_NAME_SIZE + 1, MAX_DEV_NAME_SIZE, UART_DEV_SERVICE_NAME_PREFIX, port); in UartOpen() 38 OsalMemFree(serviceName); in UartOpen() 42 struct HdfIoService *service = HdfIoServiceBind(serviceName); in UartOpen() 44 HDF_LOGE("Failed to get service %s", serviceName); in UartOpen() 46 OsalMemFree(serviceName); in UartOpen() 49 OsalMemFree(serviceName); in UartOpen() [all...] |
/drivers/hdf_core/framework/model/storage/src/mmc/ |
H A D | mmc_if.c | 27 char *serviceName = NULL; in MmcCntlrObjGetByNumber() local 32 serviceName = OsalMemCalloc(MMC_SVC_NAME_LEN + 1); in MmcCntlrObjGetByNumber() 33 if (serviceName == NULL) { in MmcCntlrObjGetByNumber() 37 if (snprintf_s(serviceName, MMC_SVC_NAME_LEN + 1, MMC_SVC_NAME_LEN, in MmcCntlrObjGetByNumber() 40 OsalMemFree(serviceName); in MmcCntlrObjGetByNumber() 45 object = (void *)HdfIoServiceBind(serviceName); in MmcCntlrObjGetByNumber() 55 OsalMemFree(serviceName); in MmcCntlrObjGetByNumber()
|
/drivers/hdf_core/framework/test/unittest/manager/ |
H A D | sample_driver_test.c | 41 static struct SampleTestDevice *GetRegistedDevice(const char *serviceName) in GetRegistedDevice() argument 52 if (strcmp(HdfDeviceGetServiceName(sampleDev->devobj), serviceName) == 0) { in GetRegistedDevice() 69 const char *serviceName = NULL; in SampleDriverRegisterDevice() local 83 serviceName = HdfSbufReadString(data); in SampleDriverRegisterDevice() 84 if (serviceName == NULL) { in SampleDriverRegisterDevice() 101 ret = HdfDeviceObjectPublishService(devObj, serviceName, SERVICE_POLICY_CAPACITY, in SampleDriverRegisterDevice() 104 HDF_LOGE("failed to publish service for %s", serviceName); in SampleDriverRegisterDevice() 116 HDF_LOGI("register device %s:%s success", moduleName, serviceName); in SampleDriverRegisterDevice() 123 const char *serviceName = NULL; in SampleDriverUnregisterDevice() local 133 serviceName in SampleDriverUnregisterDevice() [all...] |
/drivers/hdf_core/framework/core/shared/src/ |
H A D | hdf_io_service.c | 11 struct HdfIoService *HdfIoServiceBind(const char *serviceName) in HdfIoServiceBind() argument 13 return HdfIoServiceAdapterObtain(serviceName); in HdfIoServiceBind() 21 struct HdfIoService *HdfIoServicePublish(const char *serviceName, uint32_t mode) in HdfIoServicePublish() argument 24 return HdfIoServiceAdapterPublish(serviceName, mode); in HdfIoServicePublish()
|
H A D | service_status.c | 15 if (status == NULL || buf == NULL || status->serviceName == NULL) { in ServiceStatusMarshalling() 18 if (!HdfSbufWriteString(buf, status->serviceName) in ServiceStatusMarshalling() 34 status->serviceName = HdfSbufReadString(buf); in ServiceStatusUnMarshalling() 35 if (status->serviceName == NULL) { in ServiceStatusUnMarshalling()
|
/drivers/hdf_core/interfaces/inner_api/core/ |
H A D | hdf_io_service.h | 48 struct HdfIoService *HdfIoServicePublish(const char *serviceName, uint32_t mode); 51 struct HdfIoService *HdfIoServiceAdapterObtain(const char *serviceName); 53 struct HdfIoService *HdfIoServiceAdapterPublish(const char *serviceName, uint32_t mode) __attribute__((weak)); 55 int32_t HdfLoadDriverByServiceName(const char *serviceName);
|
/drivers/hdf_core/adapter/uhdf2/hdi/src/ |
H A D | devmgr_client.c | 157 static int32_t DevmgrProcessLoad(struct HDIDeviceManager *iDevMgr, const char *serviceName, int32_t id) in DevmgrProcessLoad() argument 170 if (!HdfSbufWriteString(data, serviceName)) { in DevmgrProcessLoad() 176 HDF_LOGE("failed to process load/unload device %{public}s code:%{public}d", serviceName, id); in DevmgrProcessLoad() 184 int32_t DevmgrLoadDevice(struct HDIDeviceManager *iDevMgr, const char *serviceName) in DevmgrLoadDevice() argument 186 if (iDevMgr == NULL || serviceName == NULL) { in DevmgrLoadDevice() 190 HDF_LOGI("load device: %{public}s", serviceName); in DevmgrLoadDevice() 192 return DevmgrProcessLoad(iDevMgr, serviceName, DEVMGR_SERVICE_LOAD_DEVICE); in DevmgrLoadDevice() 195 int32_t DevmgrUnloadDevice(struct HDIDeviceManager *iDevMgr, const char *serviceName) in DevmgrUnloadDevice() argument 197 if (iDevMgr == NULL || serviceName == NULL) { in DevmgrUnloadDevice() 201 HDF_LOGI("unload device: %{public}s", serviceName); in DevmgrUnloadDevice() [all...] |
H A D | hdi_support.cpp | 70 static std::string ParseLibName(const std::string &interfaceName, const std::string &serviceName, in ParseLibName() argument 74 libName << "lib" << interfaceName << "_" << serviceName << "_" << versionMajor << "." << versionMinor; in ParseLibName() 98 const std::string &desc, std::string &interface, std::string &libName, const char *serviceName) in ParseInterface() 118 libName = ParseLibName(TransFileName(interface), serviceName, versionMajor, versionMinor); in ParseInterface() 131 void *LoadHdiImpl(const char *desc, const char *serviceName) in LoadHdiImpl() argument 133 if (desc == nullptr || serviceName == nullptr || strlen(desc) == 0 || strlen(serviceName) == 0) { in LoadHdiImpl() 140 if (ParseInterface(desc, interfaceName, libName, serviceName) != HDF_SUCCESS) { in LoadHdiImpl() 181 void UnloadHdiImpl(const char *desc, const char *serviceName, void *impl) in UnloadHdiImpl() argument 189 if (ParseInterface(desc, interfaceName, libName, serviceName) ! in UnloadHdiImpl() 97 ParseInterface( const std::string &desc, std::string &interface, std::string &libName, const char *serviceName) ParseInterface() argument [all...] |
H A D | iservmgr_client.cpp | 45 sptr<IRemoteObject> GetService(const char *serviceName) override; 124 sptr<IRemoteObject> ServiceManagerProxy::GetService(const char *serviceName) in GetService() argument 128 if (!data.WriteInterfaceToken(GetDescriptor()) || !data.WriteCString(serviceName)) { in GetService() 142 HDF_LOGE("get hdi service %{public}s failed, %{public}d", serviceName, status); in GetService() 145 HDF_LOGD("get hdi service %{public}s success ", serviceName); in GetService() 157 info.serviceName = servName; in HdfDevMgrDbgFillServiceInfo() 237 const char *serviceName = reply.ReadCString(); in ListServiceByInterfaceDesc() local 238 if (serviceName == NULL) { in ListServiceByInterfaceDesc() 241 serviceNames.push_back(serviceName); in ListServiceByInterfaceDesc()
|
H A D | servstat_listener_stub.cpp | 46 status.serviceName = (name == nullptr) ? "" : name; in ServStatListenerStubOnReceive() 47 if (status.serviceName.empty()) { in ServStatListenerStubOnReceive() 48 HDF_LOGE("failed to read serviceName in ServiceStatus"); in ServStatListenerStubOnReceive() 60 HDF_LOGI("call OnReceive, %{public}s, %{public}d", status.serviceName.c_str(), status.status); in ServStatListenerStubOnReceive()
|
H A D | idevmgr_client.cpp | 52 int32_t LoadDevice(const std::string &serviceName) override; 53 int32_t UnloadDevice(const std::string &serviceName) override; 61 int32_t DeviceManagerProxy::LoadDevice(const std::string &serviceName) in LoadDevice() argument 66 HDF_LOGI("load device: %{public}s", serviceName.data()); in LoadDevice() 70 if (!data.WriteCString(serviceName.data())) { in LoadDevice() 87 int32_t DeviceManagerProxy::UnloadDevice(const std::string &serviceName) in UnloadDevice() argument 92 HDF_LOGI("unload device: %{public}s", serviceName.data()); in UnloadDevice() 96 if (!data.WriteCString(serviceName.data())) { in UnloadDevice()
|
/drivers/hdf_core/framework/support/platform/src/watchdog/ |
H A D | watchdog_if.c | 24 char *serviceName = NULL; in WatchdogGetById() local 31 serviceName = OsalMemCalloc(WATCHDOG_NAME_LEN + 1); in WatchdogGetById() 32 if (serviceName == NULL) { in WatchdogGetById() 36 if (snprintf_s(serviceName, WATCHDOG_NAME_LEN + 1, WATCHDOG_NAME_LEN, in WatchdogGetById() 39 OsalMemFree(serviceName); in WatchdogGetById() 42 obj = (struct WatchdogCntlr *)DevSvcManagerClntGetService(serviceName); in WatchdogGetById() 46 OsalMemFree(serviceName); in WatchdogGetById()
|
/drivers/peripheral/display/hdi_service/gralloc/client/ |
H A D | allocator_proxy.cpp | 31 sptr<IDisplayAllocator> IDisplayAllocator::Get(const char *serviceName) in Get() argument 54 sptr<IRemoteObject> remote = servMgr->GetService(serviceName); in Get() 57 HDF_LOGE("%{public}s: wait service:%{public}s timeout cnt:%{public}u", __func__, serviceName, cnt); in Get() 61 remote = servMgr->GetService(serviceName); in Get() 63 HDF_LOGI("%{public}s: get service:%{public}s cnt:%{public}u", __func__, serviceName, cnt); in Get() 66 HDF_LOGI("%{public}s: get service:%{public}s success cnt:%{public}u", __func__, serviceName, cnt); in Get() 73 HDF_LOGE("%{public}s: GetService %{public}s ok", __func__, serviceName); in Get()
|
/drivers/hdf_core/adapter/uhdf2/osal/test/unittest/common/ |
H A D | sample_driver.c | 44 const char *serviceName = HdfSbufReadString(data); in SampleDriverRegisteDevice() local 45 if (serviceName == NULL) { in SampleDriverRegisteDevice() 49 struct HdfDeviceObject *devObj = HdfRegisteDevice(moduleName, serviceName); in SampleDriverRegisteDevice() 66 const char *serviceName = HdfSbufReadString(data); in SampleDriverUnregisteDevice() local 67 if (serviceName == NULL) { in SampleDriverUnregisteDevice() 70 HdfUnregisteDevice(moduleName, serviceName); in SampleDriverUnregisteDevice()
|
/drivers/hdf_core/interfaces/inner_api/hdi/ |
H A D | hdi_support.h | 51 * @param serviceName Indicates the service name of the driver to load. 54 void *LoadHdiImpl(const char *desc, const char *serviceName); 62 * @param serviceName Indicates the service name of the driver to unload. 65 void UnloadHdiImpl(const char *desc, const char *serviceName, void *impl);
|
H A D | devmgr_hdi.h | 123 * @param serviceName Indicates the pointer to the service name of the device to load. 126 int32_t (*LoadDevice)(struct HDIDeviceManager *self, const char *serviceName); 132 * @param serviceName Indicates the pointer to the service name of the device to unload. 135 int32_t (*UnloadDevice)(struct HDIDeviceManager *self, const char *serviceName);
|
H A D | iservmgr_hdi.h | 57 std::string serviceName; member 83 * @param serviceName Indicates the pointer to the HDI service name to obtain. 86 virtual ::OHOS::sptr<IRemoteObject> GetService(const char *serviceName) = 0;
|
H A D | idevmgr_hdi.h | 91 * @param serviceName Indicates the service name of the device to load. 94 virtual int32_t LoadDevice(const std::string &serviceName) = 0; 99 * @param serviceName Indicates the service name of the device to unload. 102 virtual int32_t UnloadDevice(const std::string &serviceName) = 0;
|
/drivers/hdf_core/framework/core/shared/test/unittest/common/ |
H A D | hdf_core_shared_test.cpp | 74 const char *serviceName = "testServiceName"; in HWTEST_F() local 75 HdfSbufWriteString(sBuf, serviceName); in HWTEST_F() 92 const char *serviceName = "testServiceName"; in HWTEST_F() local 93 HdfSbufWriteString(sBuf, serviceName); in HWTEST_F()
|
/drivers/hdf_core/framework/core/adapter/syscall/src/ |
H A D | hdf_devmgr_adapter.c | 16 int32_t HdfLoadDriverByServiceName(const char *serviceName) in HdfLoadDriverByServiceName() argument 20 if (serviceName == NULL || strcmp(serviceName, DEV_MGR_NODE) == 0) { in HdfLoadDriverByServiceName() 34 if (!HdfSbufWriteString(data, serviceName)) { in HdfLoadDriverByServiceName() 41 HDF_LOGE("HdfLoadDriverByServiceName failed to load khdf driver %{public}s", serviceName); in HdfLoadDriverByServiceName()
|
/drivers/hdf_core/framework/tools/hdi-gen/codegen/ |
H A D | c_client_proxy_code_emitter.h | 81 const std::string &serMinorName, const std::string &remoteName, const std::string &serviceName,
103 const std::string &serMinorName, const std::string &remoteName, const std::string &serviceName,
107 const std::string &serviceName, StringBuilder &sb, const std::string &prefix) const;
121 void EmitProxyReleaseInstanceMethodImpl(const std::string &serviceName, const std::string &remoteName,
124 void EmitProxyLoadOrUnLoadHdiImpl(const std::string &serviceName, bool isLoad, StringBuilder &sb,
|
/drivers/hdf_core/framework/model/audio/usb/src/ |
H A D | audio_usb_linux.c | 60 static int32_t AudioUsbDriverLoad(const char *serviceName) in AudioUsbDriverLoad() argument 66 if (serviceName == NULL) { in AudioUsbDriverLoad() 81 ret = hdf->devMgrSvcIf->LoadDevice(hdf->devMgrSvcIf, serviceName); in AudioUsbDriverLoad() 83 ADM_LOG_INFO("serviceName[%s] load success", serviceName); in AudioUsbDriverLoad() 86 ADM_LOG_INFO("serviceName[%s] has been loaded", serviceName); in AudioUsbDriverLoad() 88 ADM_LOG_ERR("serviceName[%s] load fail", serviceName); in AudioUsbDriverLoad()
|
/drivers/hdf_core/framework/core/manager/src/ |
H A D | devmgr_service.c | 89 static int DevmgrServiceLoadDevice(struct IDevmgrService *devMgrSvc, const char *serviceName) in DevmgrServiceLoadDevice() argument 97 if (serviceName == NULL) { in DevmgrServiceLoadDevice() 101 if (!DevmgrServiceDynamicDevInfoFound(serviceName, &hostClnt, &deviceInfo)) { in DevmgrServiceLoadDevice() 102 HDF_LOGE("device %{public}s not in configed device list", serviceName); in DevmgrServiceLoadDevice() 107 HDF_LOGE("device %{public}s not an dynamic load device", serviceName); in DevmgrServiceLoadDevice() 124 HDF_LOGE("%{public}s load %{public}s failed, hostService is null", __func__, serviceName); in DevmgrServiceLoadDevice() 147 static int DevmgrServiceUnloadDevice(struct IDevmgrService *devMgrSvc, const char *serviceName) in DevmgrServiceUnloadDevice() argument 154 if (serviceName == NULL) { in DevmgrServiceUnloadDevice() 158 if (!DevmgrServiceDynamicDevInfoFound(serviceName, &hostClnt, &deviceInfo) || in DevmgrServiceUnloadDevice() 160 HDF_LOGE("device %{public}s not in configed dynamic device list", serviceName); in DevmgrServiceUnloadDevice() [all...] |
/drivers/hdf_core/framework/tools/hdf_dbg/ |
H A D | hdf_dbg.cpp | 50 " hdf_dbg -d loadFlag serviceName interfaceToken cmd parameterInCount parameterInType parameterInValue\n" 51 " hdf_dbg -d loadFlag serviceName interfaceToken cmd parameterInCount,parameterOutCount parameterInType " 85 std::string serviceName; member in HdfDbg 119 std::string titleName = "serviceName"; in PrintAllServiceInfoUser() 126 SetPadAlign(info.serviceName, ' ', ALIGN_SIZE); in PrintAllServiceInfoUser() 127 cout << info.serviceName << ":0x" << std::hex << info.devClass << "\t:0x" << info.devId << endl; in PrintAllServiceInfoUser() 137 std::string titleName = "serviceName"; in PrintAllServiceInfoKernel() 159 std::string serviceName = servName; in PrintAllServiceInfoKernel() local 160 SetPadAlign(serviceName, ' ', ALIGN_SIZE); in PrintAllServiceInfoKernel() 161 cout << serviceName << " in PrintAllServiceInfoKernel() [all...] |
/drivers/hdf_core/adapter/uhdf2/manager/src/ |
H A D | devmgr_service_stub.c | 102 const char *serviceName = HdfSbufReadString(data); in DevmgrServiceStubDispatchLoadDevice() local 103 if (serviceName == NULL) { in DevmgrServiceStubDispatchLoadDevice() 107 HDF_LOGI("%{public}s:load service %{public}s", __func__, serviceName); in DevmgrServiceStubDispatchLoadDevice() 108 return devmgrSvc->LoadDevice(devmgrSvc, serviceName); in DevmgrServiceStubDispatchLoadDevice() 113 const char *serviceName = HdfSbufReadString(data); in DevmgrServiceStubDispatchUnloadDevice() local 114 if (serviceName == NULL) { in DevmgrServiceStubDispatchUnloadDevice() 118 HDF_LOGI("%{public}s:unload service %{public}s", __func__, serviceName); in DevmgrServiceStubDispatchUnloadDevice() 119 return devmgrSvc->UnloadDevice(devmgrSvc, serviceName); in DevmgrServiceStubDispatchUnloadDevice()
|