Home
last modified time | relevance | path

Searched refs:listener (Results 1 – 25 of 66) sorted by relevance

123

/drivers/hdf_core/framework/utils/src/
Dhdf_sref.c23 if ((lockRef == 1) && (sref->listener != NULL)) { in HdfSRefAcquire()
24 struct IHdfSRefListener *listener = sref->listener; in HdfSRefAcquire() local
25 if (listener->OnFirstAcquire != NULL) { in HdfSRefAcquire()
26 listener->OnFirstAcquire(sref); in HdfSRefAcquire()
50 if ((lockRef == 0) && (sref->listener != NULL)) { in HdfSRefRelease()
51 struct IHdfSRefListener *listener = sref->listener; in HdfSRefRelease() local
52 if (listener->OnLastRelease != NULL) { in HdfSRefRelease()
53 listener->OnLastRelease(sref); in HdfSRefRelease()
58 void HdfSRefConstruct(struct HdfSRef *sref, struct IHdfSRefListener *listener) in HdfSRefConstruct() argument
60 if ((sref == NULL) || (listener == NULL)) { in HdfSRefConstruct()
[all …]
/drivers/hdf_core/framework/core/host/src/
Dpower_state_token.c29 const struct IPowerEventListener *listener = stateToken->listener; in PowerStateTokenOnFirstAcquire() local
30 if ((listener != NULL) && (listener->Resume != NULL)) { in PowerStateTokenOnFirstAcquire()
31 listener->Resume(stateToken->deviceObject); in PowerStateTokenOnFirstAcquire()
40 const struct IPowerEventListener *listener = NULL; in PowerStateTokenOnLastRelease() local
51 listener = stateToken->listener; in PowerStateTokenOnLastRelease()
52 if ((listener != NULL) && (listener->Suspend != NULL)) { in PowerStateTokenOnLastRelease()
53 listener->Suspend(stateToken->deviceObject); in PowerStateTokenOnLastRelease()
60 …if (stateToken == NULL || stateToken->listener == NULL || stateToken->mode != HDF_POWER_SYS_CTRL) { in PowerStateChange()
66 if (stateToken->listener->Suspend != NULL) { in PowerStateChange()
67 return stateToken->listener->Suspend(stateToken->deviceObject); in PowerStateChange()
[all …]
/drivers/hdf_core/framework/core/shared/src/
Dioserstat_listener.c14 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d… in OnIoServiceEventReceive() argument
16 if (listener == NULL || service == NULL || data == NULL) { in OnIoServiceEventReceive()
25 struct IoServiceStatusListener *statusListener = listener->priv; in OnIoServiceEventReceive()
36 … struct IoServiceStatusListener *listener = OsalMemCalloc(sizeof(struct IoServiceStatusListener)); in IoServiceStatusListenerNewInstance() local
37 if (listener == NULL) { in IoServiceStatusListenerNewInstance()
41 listener->ioservListener.onReceive = OnIoServiceEventReceive; in IoServiceStatusListenerNewInstance()
42 listener->ioservListener.priv = (void *)listener; in IoServiceStatusListenerNewInstance()
44 return &listener->svcstatListener; in IoServiceStatusListenerNewInstance()
47 void IoServiceStatusListenerFree(struct ServiceStatusListener *listener) in IoServiceStatusListenerFree() argument
49 if (listener == NULL) { in IoServiceStatusListenerFree()
[all …]
Dsvcmgr_ioservice.c54 struct ISvcMgrIoservice *self, struct ServiceStatusListener *listener, uint16_t deviceClass) in SvcMgrIoserviceRegSvcStatListener() argument
56 if (self == NULL || listener == NULL || deviceClass >= DEVICE_CLASS_MAX) { in SvcMgrIoserviceRegSvcStatListener()
62 = CONTAINER_OF(listener, struct IoServiceStatusListener, svcstatListener); in SvcMgrIoserviceRegSvcStatListener()
74 …oserviceUnRegSvcStatListener(struct ISvcMgrIoservice *self, struct ServiceStatusListener *listener) in SvcMgrIoserviceUnRegSvcStatListener() argument
76 if (self == NULL || listener == NULL) { in SvcMgrIoserviceUnRegSvcStatListener()
82 = CONTAINER_OF(listener, struct IoServiceStatusListener, svcstatListener); in SvcMgrIoserviceUnRegSvcStatListener()
/drivers/peripheral/usb/ddk/host/src/
Dddk_pnp_listener_mgr.c39 struct HdfDevEventlistener *listener; member
45 static bool DdkListenerMgrIsExists(const struct HdfDevEventlistener *listener) in DdkListenerMgrIsExists() argument
58 if (pos == listener) { in DdkListenerMgrIsExists()
71 const struct HdfDevEventlistener *listener = handlePriv->listener; in DdkListenerMgrNotifyOne() local
91 if (listener->callBack(listener->priv, handlePriv->cmd, dataTmp) != HDF_SUCCESS) { in DdkListenerMgrNotifyOne()
104 const struct HdfDevEventlistener *listener = handlePriv->listener; in DdkListenerMgrNotifyGadgetOne() local
105 if (listener->callBack(listener->priv, handlePriv->cmd, NULL) != HDF_SUCCESS) { in DdkListenerMgrNotifyGadgetOne()
125 handlePriv.listener = pos; in DdkListenerMgrNotifyAll()
134 int32_t DdkListenerMgrAdd(struct HdfDevEventlistener *listener) in DdkListenerMgrAdd() argument
136 if (listener == NULL) { in DdkListenerMgrAdd()
[all …]
/drivers/hdf_core/adapter/uhdf2/hdi/src/
Dservstat_listener.c26 struct ServiceStatusListener listener; member
49 if (stub->listener.callback != NULL) { in ServstatListenerStubRemoteDispatch()
50 stub->listener.callback(&stub->listener, &status); in ServstatListenerStubRemoteDispatch()
56 int ServiceStatusListenerMarshalling(struct ServiceStatusListener *listener, struct HdfSBuf *buf) in ServiceStatusListenerMarshalling() argument
58 if (listener == NULL || buf == NULL) { in ServiceStatusListenerMarshalling()
62 …ct ServstatListenerStub *listenerStub = CONTAINER_OF(listener, struct ServstatListenerStub, listen… in ServiceStatusListenerMarshalling()
90 return &stub->listener; in HdiServiceStatusListenerNewInstance()
93 void HdiServiceStatusListenerFree(struct ServiceStatusListener *listener) in HdiServiceStatusListenerFree() argument
95 if (listener == NULL) { in HdiServiceStatusListenerFree()
99 … struct ServstatListenerStub *stub = CONTAINER_OF(listener, struct ServstatListenerStub, listener); in HdiServiceStatusListenerFree()
/drivers/peripheral/input/hal/src/
Dinput_reporter.c33 static int32_t EventListenerCallback(struct HdfDevEventlistener *listener, struct HdfIoService *ser… in EventListenerCallback() argument
36 (void)listener; in EventListenerCallback()
82 …struct HdfDevEventlistener *listener = (struct HdfDevEventlistener *)malloc(sizeof(struct HdfDevEv… in EventListenerInstance() local
83 if (listener == NULL) { in EventListenerInstance()
88 …(void)memset_s(listener, sizeof(struct HdfDevEventlistener), 0, sizeof(struct HdfDevEventlistener)… in EventListenerInstance()
89 listener->onReceive = EventListenerCallback; in EventListenerInstance()
90 return listener; in EventListenerInstance()
110 struct HdfDevEventlistener *listener = EventListenerInstance(); in RegisterReportCallback() local
111 if (listener == NULL) { in RegisterReportCallback()
115 if (HdfDeviceRegisterEventListener(pos->service, listener) != INPUT_SUCCESS) { in RegisterReportCallback()
[all …]
/drivers/hdf_core/framework/test/fuzztest/ioservice_fuzzer/ioservicelisten_fuzzer/
Dioservicelisten_fuzzer.cpp22 struct HdfDevEventlistener listener; member
26 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
29 .listener.onReceive = OnDevEventReceived,
30 .listener.priv = const_cast<void *>(static_cast<const void *>("listener0")),
35 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d… in OnDevEventReceived() argument
46 struct Eventlistener *listenercount = CONTAINER_OF(listener, struct Eventlistener, listener); in OnDevEventReceived()
67 if (HdfDeviceRegisterEventListener(serv, &g_listener0.listener) == HDF_SUCCESS) { in IoserviceListenFuzzTest()
68 int ret = HdfDeviceUnregisterEventListener(serv, &g_listener0.listener); in IoserviceListenFuzzTest()
/drivers/hdf_core/framework/core/manager/test/unittest/common/
Dhdf_ioservice_test.cpp33 struct HdfDevEventlistener listener; member
44 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
46 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
48 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
73 listener0.listener.onReceive = OnDevEventReceived; in SetUpTestCase()
74 listener0.listener.priv = const_cast<void *>(static_cast<const void *>("listener0")); in SetUpTestCase()
76 listener1.listener.onReceive = OnDevEventReceived; in SetUpTestCase()
77 listener1.listener.priv = const_cast<void *>(static_cast<const void *>("listener1")); in SetUpTestCase()
79 listener2.listener.onReceive = OnDevEventReceivedTest; in SetUpTestCase()
80 listener2.listener.priv = const_cast<void *>(static_cast<const void *>("listener2")); in SetUpTestCase()
[all …]
/drivers/hdf_core/framework/test/fuzztest/ioservice_fuzzer/ioservicegrouplisten_fuzzer/
Dioservicegrouplisten_fuzzer.cpp20 struct HdfDevEventlistener listener; member
24 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
27 .listener.onReceive = OnDevEventReceived,
28 .listener.priv = const_cast<void *>(static_cast<const void *>("listener0")),
33 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d… in OnDevEventReceived() argument
44 struct Eventlistener *listenercount = CONTAINER_OF(listener, struct Eventlistener, listener); in OnDevEventReceived()
77 if (HdfIoServiceGroupRegisterListener(group, &g_listener0.listener) == HDF_SUCCESS) { in IoserviceGroupListenFuzzTest()
78 ret = HdfIoServiceGroupUnregisterListener(group, &g_listener0.listener); in IoserviceGroupListenFuzzTest()
/drivers/hdf_core/interfaces/inner_api/core/
Dhdf_io_service_if.h73 …struct HdfDevEventlistener *listener, struct HdfIoService *service, uint32_t id, struct HdfSBuf *d…
183 …erviceGroupRegisterListener(struct HdfIoServiceGroup *group, struct HdfDevEventlistener *listener);
198 struct HdfIoServiceGroup *group, struct HdfDevEventlistener *listener, int policy);
210 …viceGroupUnregisterListener(struct HdfIoServiceGroup *group, struct HdfDevEventlistener *listener);
245 … HdfDeviceRegisterEventListener(struct HdfIoService *target, struct HdfDevEventlistener *listener);
260 struct HdfIoService *target, struct HdfDevEventlistener *listener, int policy);
272 …dfDeviceUnregisterEventListener(struct HdfIoService *target, struct HdfDevEventlistener *listener);
Dsvcmgr_ioservice.h27 struct ServiceStatusListener *listener, uint16_t deviceClass);
29 struct ServiceStatusListener *listener);
/drivers/peripheral/distributed_camera/hdi_service/test/sample/
Dstream_customer.cpp32 sptr<IBufferConsumerListener> listener = nullptr; in CreateProducer() local
34 listener = new TestBuffersConsumerListener(consumer_, callback); in CreateProducer()
36 listener = new TestBuffersConsumerListener(consumer_, callback); in CreateProducer()
38 consumer_->RegisterConsumerListener(listener); in CreateProducer()
/drivers/hdf_core/framework/support/platform/src/fwk/
Dplatform_event.c221 struct PlatformEventListener *listener = (struct PlatformEventListener *)waiter->data; in PlatformEventAsyncCallback() local
223 if (listener == NULL) { in PlatformEventAsyncCallback()
228 return listener->cb(listener, (uint32_t)events & listener->mask); in PlatformEventAsyncCallback()
231 int32_t PlatformEventListen(struct PlatformEvent *pe, const struct PlatformEventListener *listener) in PlatformEventListen() argument
235 if (pe == NULL || listener == NULL) { in PlatformEventListen()
238 if (listener->mask == 0 || listener->cb == NULL) { in PlatformEventListen()
246 waiter->mask = listener->mask; in PlatformEventListen()
247 waiter->data = (void *)listener; in PlatformEventListen()
259 void PlatformEventUnlisten(struct PlatformEvent *pe, const struct PlatformEventListener *listener) in PlatformEventUnlisten() argument
264 if (pe == NULL || listener == NULL) { in PlatformEventUnlisten()
[all …]
Dplatform_listener_u.c155 struct HdfDevEventlistener *listener = NULL; in PlatformUserListenerInit() local
163 listener = OsalMemCalloc(sizeof(struct HdfDevEventlistener)); in PlatformUserListenerInit()
164 if (listener == NULL) { in PlatformUserListenerInit()
170 userListener->listener = listener; in PlatformUserListenerInit()
175 listener->callBack = callback; in PlatformUserListenerInit()
176 listener->priv = userListener; in PlatformUserListenerInit()
177 if (HdfDeviceRegisterEventListener(manager->service, listener) != HDF_SUCCESS) { in PlatformUserListenerInit()
180 OsalMemFree(listener); in PlatformUserListenerInit()
238 if (HdfDeviceUnregisterEventListener(manager->service, pos->listener) != HDF_SUCCESS) { in PlatformUserListenerDestory()
243 OsalMemFree(pos->listener); in PlatformUserListenerDestory()
[all …]
/drivers/hdf_core/framework/core/adapter/syscall/src/
Dhdf_syscall_adapter.c94 struct HdfDevEventlistener *listener = NULL; in HdfDevEventDispatchLocked() local
110 … DLIST_FOR_EACH_ENTRY(listener, thread->listenerListPtr, struct HdfDevEventlistener, listNode) { in HdfDevEventDispatchLocked()
111 if (listener->onReceive != NULL) { in HdfDevEventDispatchLocked()
112 (void)listener->onReceive(listener, &adapter->super, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked()
113 } else if (listener->callBack != NULL) { in HdfDevEventDispatchLocked()
114 (void)listener->callBack(listener->priv, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked()
122 DLIST_FOR_EACH_ENTRY(listener, &adapter->listenerList, struct HdfDevEventlistener, listNode) { in HdfDevEventDispatchLocked()
123 if (listener->onReceive != NULL) { in HdfDevEventDispatchLocked()
124 (void)listener->onReceive(listener, &adapter->super, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked()
125 } else if (listener->callBack != NULL) { in HdfDevEventDispatchLocked()
[all …]
/drivers/hdf_core/framework/test/unittest/platform/common/
Dplatform_event_test.c102 static int32_t PlatformEventListenTestCb(struct PlatformEventListener *listener, uint32_t events) in PlatformEventListenTestCb() argument
104 uint32_t *pEvents = (uint32_t *)listener->data; in PlatformEventListenTestCb()
113 struct PlatformEventListener listener; in PlatformEventTestListenAndUnliten() local
117 listener.mask = PLAT_TEST_EVENT_A | PLAT_TEST_EVENT_B; in PlatformEventTestListenAndUnliten()
118 listener.cb = PlatformEventListenTestCb; in PlatformEventTestListenAndUnliten()
119 listener.data = (void *)&events; in PlatformEventTestListenAndUnliten()
122 ret = PlatformEventListen(pe, &listener); in PlatformEventTestListenAndUnliten()
154 struct PlatformEventListener listener; in PlatformEventTestReliability() local
174 ret = PlatformEventListen(NULL, &listener); in PlatformEventTestReliability()
/drivers/peripheral/camera/vdi_base/common/adapter/platform/hdf_driver/src/driver_adapter/src/
Dcamera_common.cpp59 static int32_t CameraMsgRegisterEventListener(struct HdfDevEventlistener *listener) in CameraMsgRegisterEventListener() argument
61 if (g_cameraService == nullptr || listener == nullptr) { in CameraMsgRegisterEventListener()
64 if (HdfDeviceRegisterEventListener(g_cameraService, listener) != HDF_SUCCESS) { in CameraMsgRegisterEventListener()
72 static int OnCameraEvents(struct HdfDevEventlistener *listener, struct HdfIoService *service, in OnCameraEvents() argument
75 (void)listener; in OnCameraEvents()
/drivers/hdf_core/framework/support/platform/include/fwk/
Dplatform_event.h51 int32_t (*cb)(struct PlatformEventListener *listener, uint32_t events);
112 int32_t PlatformEventListen(struct PlatformEvent *pe, const struct PlatformEventListener *listener);
122 void PlatformEventUnlisten(struct PlatformEvent *pe, const struct PlatformEventListener *listener);
/drivers/peripheral/usb/ddk/host/include/
Dddk_pnp_listener_mgr.h24 int32_t DdkListenerMgrRemove(struct HdfDevEventlistener *listener);
25 int32_t DdkListenerMgrAdd(struct HdfDevEventlistener *listener);
/drivers/hdf_core/framework/core/host/include/
Dpower_state_token.h18 const struct IPowerEventListener *listener; member
26 struct HdfDeviceObject *deviceObject, const struct IPowerEventListener *listener);
/drivers/hdf_core/framework/test/unittest/pm/
Dhdf_pm_driver_test.c105 struct PmDriverPmListener listener; member
220 g_pmTestType[HDF_TEST_DRIVER].listener.powerListener.DozeResume = HdfPmHdfTestDozeResume; in HdfPmSetListeners()
221 g_pmTestType[HDF_TEST_DRIVER].listener.powerListener.DozeSuspend = HdfPmHdfTestDozeSuspend; in HdfPmSetListeners()
222 g_pmTestType[HDF_TEST_DRIVER].listener.powerListener.Resume = HdfPmHdfTestResume; in HdfPmSetListeners()
223 g_pmTestType[HDF_TEST_DRIVER].listener.powerListener.Suspend = HdfPmHdfTestSuspend; in HdfPmSetListeners()
225 g_pmTestType[SAMPLE_TEST_DRIVER].listener.powerListener.DozeResume = HdfPmSampleDozeResume; in HdfPmSetListeners()
226 g_pmTestType[SAMPLE_TEST_DRIVER].listener.powerListener.DozeSuspend = HdfPmSampleDozeSuspend; in HdfPmSetListeners()
227 g_pmTestType[SAMPLE_TEST_DRIVER].listener.powerListener.Resume = HdfPmSampleResume; in HdfPmSetListeners()
228 g_pmTestType[SAMPLE_TEST_DRIVER].listener.powerListener.Suspend = HdfPmSampleSuspend; in HdfPmSetListeners()
230 g_pmTestType[PM_TEST_DRIVER].listener.powerListener.DozeResume = HdfPmTestDozeResume; in HdfPmSetListeners()
[all …]
/drivers/peripheral/distributed_camera/hdi_service/test/unittest/common/dstream_operator/
Dstream_consumer.cpp31 sptr<IBufferConsumerListener> listener(new TestBuffersConsumerListener()); in CreateProducer() local
32 consumer_->RegisterConsumerListener(listener); in CreateProducer()
/drivers/hdf_core/interfaces/inner_api/utils/
Dhdf_sref.h27 struct IHdfSRefListener *listener; member
36 void HdfSRefConstruct(struct HdfSRef *sref, struct IHdfSRefListener *listener);
/drivers/hdf_core/interfaces/inner_api/hdi/
Dservmgr_hdi.h79 … struct HDIServiceManager *self, struct ServiceStatusListener *listener, uint16_t deviceClass);
88 …sterServiceStatusListener)(struct HDIServiceManager *self, struct ServiceStatusListener *listener);

123