Home
last modified time | relevance | path

Searched refs:asyncEvent (Results 1 – 10 of 10) sorted by relevance

/ohos5.0/foundation/communication/connected_nfc_tag/frameworks/js/napi/
H A Dnfc_napi_event.cpp34 void EventNotify(AsyncEventData *asyncEvent);
48 … AsyncEventData *asyncEvent = new AsyncEventData(each.m_regEnv, each.m_regHanderRef, result); in CheckAndNotify() local
49 if (asyncEvent == nullptr) { in CheckAndNotify()
52 EventNotify(asyncEvent); in CheckAndNotify()
65 void NapiEvent::EventNotify(AsyncEventData *asyncEvent) in EventNotify() argument
68 if (asyncEvent == nullptr) { in EventNotify()
73 napi_get_uv_event_loop(asyncEvent->env, &loop); in EventNotify()
78 delete asyncEvent; in EventNotify()
79 asyncEvent = nullptr; in EventNotify()
83 HILOGI("Get the event loop, napi_env: %{public}p", asyncEvent->env); in EventNotify()
[all …]
/ohos5.0/foundation/arkui/ace_engine/component_ext/movingphoto/
H A Dmovingphoto_napi.cpp157 asyncEvent->Call(0, nullptr); in JsOnComplete()
174 auto onStart = [asyncEvent]() { in JsOnStart()
175 asyncEvent->Call(0, nullptr); in JsOnStart()
192 auto onStop = [asyncEvent]() { in JsOnStop()
193 asyncEvent->Call(0, nullptr); in JsOnStop()
210 auto onPause = [asyncEvent]() { in JsOnPause()
211 asyncEvent->Call(0, nullptr); in JsOnPause()
228 auto onFinish = [asyncEvent]() { in JsOnFinish()
229 asyncEvent->Call(0, nullptr); in JsOnFinish()
246 auto onError = [asyncEvent]() { in JsOnError()
[all …]
/ohos5.0/foundation/communication/wifi/wifi/frameworks/js/napi/src/
H A Dwifi_napi_event.cpp71 void NapiEvent::EventNotify(AsyncEventData *asyncEvent) in EventNotify() argument
74 if (asyncEvent == nullptr) { in EventNotify()
79 auto task = [asyncEvent]() { in EventNotify()
100 … if (each.m_regEnv == asyncEvent->env && each.m_regHanderRef == asyncEvent->callbackRef) { in EventNotify()
110 res = napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
112 res, asyncEvent->callbackRef, refCount); in EventNotify()
118 res = napi_get_reference_value(asyncEvent->env, asyncEvent->callbackRef, &handler); in EventNotify()
125 jsEvent = asyncEvent->packResult(); in EventNotify()
133 res = napi_reference_unref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
136 delete asyncEvent; in EventNotify()
[all …]
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/controller/
H A Dnfc_napi_controller_event.cpp43 void EventNotify(AsyncEventData *asyncEvent);
58 AsyncEventData *asyncEvent = in CheckAndNotify() local
60 if (asyncEvent == nullptr) { in CheckAndNotify()
63 EventNotify(asyncEvent); in CheckAndNotify()
112 if (asyncEvent == nullptr) { in EventNotify()
117 napi_get_uv_event_loop(asyncEvent->env, &loop); in EventNotify()
122 delete asyncEvent; in EventNotify()
123 asyncEvent = nullptr; in EventNotify()
128 napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
129 work->data = asyncEvent; in EventNotify()
[all …]
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/cardEmulation/
H A Dnfc_napi_hce_adapter.cpp39 void EventNotify(AsyncEventData* asyncEvent);
52 AsyncEventData* asyncEvent = in CheckAndNotify() local
54 if (asyncEvent == nullptr) { in CheckAndNotify()
57 EventNotify(asyncEvent); in CheckAndNotify()
357 if (asyncEvent == nullptr) { in EventNotify()
362 napi_get_uv_event_loop(asyncEvent->env, &loop); in EventNotify()
367 delete asyncEvent; in EventNotify()
368 asyncEvent = nullptr; in EventNotify()
373 napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
374 work->data = asyncEvent; in EventNotify()
[all …]
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/include/
H A Dnapi_bluetooth_event.h57 static void EventNotify(AsyncEventData *asyncEvent);
71 AsyncEventData *asyncEvent = new (std::nothrow)AsyncEventData(cb, func); in CheckAndNotify() local
72 if (asyncEvent == nullptr) { in CheckAndNotify()
76 EventNotify(asyncEvent); in CheckAndNotify()
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/common/
H A Dnapi_bluetooth_event.cpp26 void NapiEvent::EventNotify(AsyncEventData *asyncEvent) in EventNotify() argument
29 napi_get_uv_event_loop(asyncEvent->env_, &loop); in EventNotify()
34 delete asyncEvent; in EventNotify()
35 asyncEvent = nullptr; in EventNotify()
38 work->data = asyncEvent; in EventNotify()
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/tag/
H A Dnfc_napi_foreground_dispatch.cpp41 void EventNotify(AsyncEventData *asyncEvent);
68 AsyncEventData *asyncEvent = in CheckAndNotify() local
70 if (asyncEvent == nullptr) { in CheckAndNotify()
73 EventNotify(asyncEvent); in CheckAndNotify()
126 if (asyncEvent == nullptr) { in EventNotify()
131 napi_get_uv_event_loop(asyncEvent->env, &loop); in EventNotify()
136 delete asyncEvent; in EventNotify()
137 asyncEvent = nullptr; in EventNotify()
143 napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
144 work->data = asyncEvent; in EventNotify()
[all …]
/ohos5.0/foundation/communication/wifi/wifi/frameworks/js/napi/inc/
H A Dwifi_napi_event.h94 void EventNotify(AsyncEventData *asyncEvent);
106 … AsyncEventData *asyncEvent = new (std::nothrow)AsyncEventData(each.m_regEnv, each.m_regHanderRef, in CheckAndNotify() local
108 if (asyncEvent == nullptr) { in CheckAndNotify()
111 EventNotify(asyncEvent); in CheckAndNotify()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/patternlock/
H A Dpatternlock_napi.cpp239 auto asyncEvent = std::make_shared<NapiAsyncEvnet>(env, argv[0]); in OnPatternComplete() local
240 auto onComplete = [asyncEvent](const BaseEventInfo* info) { in OnPatternComplete()
244 arrayValue = CommonNapiUtils::CreateArray(asyncEvent->GetEnv()); in OnPatternComplete()
248asyncEvent->GetEnv(), arrayValue, i, CommonNapiUtils::CreateInt32(asyncEvent->GetEnv(), arr.at(i))… in OnPatternComplete()
251 asyncEvent->Call(1, argv); in OnPatternComplete()