Lines Matching refs:hdi
33 int32_t InstanceReporterHdi(InputReporter **hdi);
34 int32_t InstanceControllerHdi(InputController **hdi);
314 static void FreeInputHdi(IInputInterface **hdi)
316 if (hdi == NULL || *hdi == NULL) {
319 if ((*hdi)->iInputManager != NULL) {
320 free((*hdi)->iInputManager);
321 (*hdi)->iInputManager = NULL;
324 if ((*hdi)->iInputController != NULL) {
325 free((*hdi)->iInputController);
326 (*hdi)->iInputController = NULL;
329 if ((*hdi)->iInputReporter != NULL) {
330 free((*hdi)->iInputReporter);
331 (*hdi)->iInputReporter = NULL;
333 free((*hdi));
334 *hdi = NULL;
340 IInputInterface *hdi = (IInputInterface *)malloc(sizeof(IInputInterface));
341 if (hdi == NULL) {
345 (void)memset_s(hdi, sizeof(IInputInterface), 0, sizeof(IInputInterface));
347 ret = InstanceManagerHdi(&hdi->iInputManager);
349 FreeInputHdi(&hdi);
353 ret = InstanceControllerHdi(&hdi->iInputController);
355 FreeInputHdi(&hdi);
359 ret = InstanceReporterHdi(&hdi->iInputReporter);
361 FreeInputHdi(&hdi);
364 return hdi;
379 HDF_LOGE("%s: failed to instance hdi", __func__);