Home
last modified time | relevance | path

Searched refs:deferred (Results 1 – 25 of 163) sorted by relevance

1234567

/base/location/interfaces/inner_api/include/
Dlocation_async_context.h46 napi_deferred deferred = nullptr) : AsyncContext(env, work, deferred), loc(nullptr) {} in AsyncContext() argument
59 napi_deferred deferred = nullptr) : AsyncContext(env, work, deferred), enable(false) {} in AsyncContext() argument
72 …LocationMockAsyncContext(napi_env env, napi_async_work work = nullptr, napi_deferred deferred = nu…
73 : AsyncContext(env, work, deferred), timeInterval(0), enable(false) {} in AsyncContext() argument
84 … CountryCodeContext(napi_env env, napi_async_work work = nullptr, napi_deferred deferred = nullptr)
85 : AsyncContext(env, work, deferred), country(nullptr) {} in AsyncContext() argument
97 …RequestAsyncContext(napi_env env, napi_async_work work = nullptr, napi_deferred deferred = nullptr)
98 : AsyncContext(env, work, deferred), loc(nullptr), request(nullptr) {} in AsyncContext() argument
109 … SwitchAsyncContext(napi_env env, napi_async_work work = nullptr, napi_deferred deferred = nullptr)
110 : AsyncContext(env, work, deferred), enable(false) {} in AsyncContext() argument
[all …]
Dasync_context.h28 napi_deferred deferred; variable
40 deferred = d;
Dlocator_callback_host.h72 context->deferred = deferred_; in InitContext()
142 inline void SetDeferred(const napi_deferred& deferred) in SetDeferred() argument
144 deferred_ = deferred; in SetDeferred()
/base/sensors/miscdevice/interfaces/plugin/vibrator/src/
Dvibrator_js.cpp77 napi_deferred deferred = nullptr; in VibrateTime() local
79 NAPI_CALL(env, napi_create_promise(env, &deferred, &promise)); in VibrateTime()
80 asyncCallbackInfo->deferred = deferred; in VibrateTime()
100 napi_deferred deferred = nullptr; in VibrateEffectId() local
102 NAPI_CALL(env, napi_create_promise(env, &deferred, &promise)); in VibrateEffectId()
103 asyncCallbackInfo->deferred = deferred; in VibrateEffectId()
242 napi_deferred deferred = nullptr; in VibrateEffect() local
244 CHKCP((napi_create_promise(env, &deferred, &promise) == napi_ok), "napi_create_promise fail"); in VibrateEffect()
245 asyncCallbackInfo->deferred = deferred; in VibrateEffect()
308 napi_deferred deferred = nullptr; in Cancel() local
[all …]
/base/web/webview/interfaces/kits/napi/webviewcontroller/
Dwebview_hasimage_callback.h26 explicit WebviewHasImageCallback(napi_env env, napi_ref callbackRef, napi_deferred deferred) in WebviewHasImageCallback() argument
27 : env_(env), callbackRef_(callbackRef), deferred_(deferred) {} in WebviewHasImageCallback()
45 static void UvAfterWorkCbPromise(napi_env env, napi_deferred deferred, bool result);
Dwebview_javascript_execute_callback.h74 napi_env env, napi_ref callbackRef, napi_deferred deferred, bool extention) in WebviewJavaScriptExecuteCallback() argument
75 : env_(env), callbackRef_(callbackRef), deferred_(deferred), extention_(extention) in WebviewJavaScriptExecuteCallback()
98 napi_env env, napi_deferred deferred, std::shared_ptr<NWebMessage> result, bool extention);
/base/theme/screenlock_mgr/frameworks/js/napi/src/
Dscreenlock_callback.cpp76 if (callBackPtr->deferred) { in UvWorkOnCallBack()
78 napi_resolve_deferred(callBackPtr->env, callBackPtr->deferred, in UvWorkOnCallBack()
81 napi_reject_deferred(callBackPtr->env, callBackPtr->deferred, in UvWorkOnCallBack()
110 screenlockOnCallBack->deferred = eventListener_.deferred; in OnCallBack()
Dnapi_screenlock_ability.cpp258 napi_deferred deferred; in NAPI_Lock() local
259 napi_create_promise(env, &deferred, &ret); in NAPI_Lock()
261 … EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::LOCK }; in NAPI_Lock()
304 napi_deferred deferred; in NAPI_UnlockScreen() local
305 napi_create_promise(env, &deferred, &ret); in NAPI_UnlockScreen()
307 …EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::UNLOCKSCREE… in NAPI_UnlockScreen()
348 napi_deferred deferred; in NAPI_Unlock() local
349 napi_create_promise(env, &deferred, &ret); in NAPI_Unlock()
351 … EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::UNLOCK }; in NAPI_Unlock()
/base/web/webview/interfaces/kits/napi/webasynccontroller/
Dnapi_web_async_controller.cpp82 napi_deferred deferred = nullptr; in StoreWebArchiveInternal() local
84 napi_create_promise(env, &deferred, &promise); in StoreWebArchiveInternal()
85 if (promise && deferred) { in StoreWebArchiveInternal()
86 webAsyncController->StoreWebArchivePromise(baseName, autoName, env, deferred); in StoreWebArchiveInternal()
248 napi_deferred deferred) in StoreWebArchivePromise() argument
256 napi_reject_deferred(env, deferred, jsResult); in StoreWebArchivePromise()
260 if (deferred == nullptr) { in StoreWebArchivePromise()
265 callbackImpl->SetCallBack([env, deferred](std::string result) { in StoreWebArchivePromise()
278 napi_resolve_deferred(env, deferred, jsResult); in StoreWebArchivePromise()
281 napi_reject_deferred(env, deferred, jsResult); in StoreWebArchivePromise()
/base/time/time_service/framework/js/napi/system_time/src/
Djs_systemtime.cpp36 napi_deferred deferred = nullptr; member
52 napi_deferred deferred = nullptr; in TimePaddingAsyncCallbackInfo() local
53 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in TimePaddingAsyncCallbackInfo()
54 asynccallbackinfo->deferred = deferred; in TimePaddingAsyncCallbackInfo()
98 info.deferred = asyncContext->deferred; in JSSystemTimeSetTime()
155 info.deferred = asyncContext->deferred; in JSSystemTimeSetTimeZone()
214 info.deferred = asyncContext->deferred; in JSSystemTimeGetCurrentTime()
273 info.deferred = asyncContext->deferred; in JSSystemTimeGetRealActiveTime()
332 info.deferred = asyncContext->deferred; in JSSystemTimeGetRealTime()
385 info.deferred = asyncContext->deferred; in JSSystemTimeGetDate()
[all …]
/base/hiviewdfx/hiappevent/frameworks/js/napi/include/
Dnapi_hiappevent_write.h28 napi_deferred deferred; member
38 this->deferred = nullptr; in HiAppEventAsyncContext()
/base/web/webview/interfaces/kits/napi/webdatabase/
Dnapi_geolocation_permission.cpp42 napi_deferred deferred; member
53 napi_deferred deferred; member
211 napi_resolve_deferred(env, param->deferred, args[1]); in GetPermissionStatePromiseComplete()
213 napi_reject_deferred(env, param->deferred, args[0]); in GetPermissionStatePromiseComplete()
252 .deferred = nullptr, in GetPermissionStateAsync()
272 napi_deferred deferred = nullptr; in GetPermissionStatePromise() local
274 napi_create_promise(env, &deferred, &promise); in GetPermissionStatePromise()
281 .deferred = deferred, in GetPermissionStatePromise()
384 napi_resolve_deferred(env, param->deferred, args[1]); in GetOriginsPromiseComplete()
386 napi_reject_deferred(env, param->deferred, args[0]); in GetOriginsPromiseComplete()
[all …]
/base/customization/enterprise_device_management/interfaces/kits/common/src/
Dnapi_edm_common.cpp365 napi_resolve_deferred(env, asyncCallbackInfo->deferred, error); in NativeVoidCallbackComplete()
368 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeVoidCallbackComplete()
370 napi_reject_deferred(env, asyncCallbackInfo->deferred, in NativeVoidCallbackComplete()
400 napi_create_promise(env, &context->deferred, &result); in HandleAsyncWork()
421 if (asyncCallbackInfo->deferred != nullptr) { in NativeBoolCallbackComplete()
427 napi_resolve_deferred(env, asyncCallbackInfo->deferred, result); in NativeBoolCallbackComplete()
429 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeBoolCallbackComplete()
461 if (asyncCallbackInfo->deferred != nullptr) { in NativeNumberCallbackComplete()
467 napi_resolve_deferred(env, asyncCallbackInfo->deferred, result); in NativeNumberCallbackComplete()
469 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeNumberCallbackComplete()
[all …]
/base/security/certificate_manager/interfaces/kits/napi/src/
Dcm_napi_uninstall_all_app_cert.cpp34 napi_deferred deferred = nullptr; member
89 GenerateNapiPromise(env, asyncContext->callback, &asyncContext->deferred, &promise); in UninstallAllAppCertAsyncWork()
113 if (context->deferred != nullptr) { in UninstallAllAppCertAsyncWork()
114 GeneratePromise(env, context->deferred, context->result, result, sizeof(result)); in UninstallAllAppCertAsyncWork()
Dcm_napi_set_cert_status.cpp34 napi_deferred deferred = nullptr; member
140 if (context->deferred != nullptr) { in SetCertStatusComplete()
141 GeneratePromise(env, context->deferred, context->result, result, sizeof(result)); in SetCertStatusComplete()
151 GenerateNapiPromise(env, context->callback, &context->deferred, &promise); in SetCertStatusAsyncWork()
Dcm_napi_grant.cpp39 napi_deferred deferred = nullptr; member
227 if (context->deferred != nullptr) { in GrantUidComplete()
228 GeneratePromise(env, context->deferred, context->errCode, result, sizeof(result)); in GrantUidComplete()
253 if (context->deferred != nullptr) { in RemoveOrIsAuthedComplete()
254 GeneratePromise(env, context->deferred, context->errCode, result, sizeof(result)); in RemoveOrIsAuthedComplete()
327 if (context->deferred != nullptr) { in GetUidListComplete()
328 GeneratePromise(env, context->deferred, context->errCode, result, sizeof(result)); in GetUidListComplete()
338 GenerateNapiPromise(env, context->callback, &context->deferred, &promise); in GrantUidAsyncWork()
362 GenerateNapiPromise(env, context->callback, &context->deferred, &promise); in RemoveUidAsyncWork()
386 GenerateNapiPromise(env, context->callback, &context->deferred, &promise); in IsAuthedAsyncWork()
[all …]
/base/hiviewdfx/hiview/interfaces/js/napi/src/
Dhiview_napi_adapter.cpp72 if (params->deferred != nullptr) { in FileOperationCompleteCallback()
73 isSuccess ? napi_resolve_deferred(env, params->deferred, results[VAL_INDEX]) : in FileOperationCompleteCallback()
74 napi_reject_deferred(env, params->deferred, results[ERR_INDEX]); in FileOperationCompleteCallback()
/base/hiviewdfx/hiappevent/frameworks/js/napi/src/
Dnapi_hiappevent_write.cpp83 if (asyncContext->deferred != nullptr) { // promise in Write()
85 napi_resolve_deferred(env, asyncContext->deferred, results[VALUE_INDEX]); in Write()
87 napi_reject_deferred(env, asyncContext->deferred, results[ERR_INDEX]); in Write()
/base/startup/init/interfaces/kits/jskits/src/
Dnative_parameters_js.cpp31 napi_deferred deferred = nullptr;
66 if (asyncContext->deferred) { in SetCallbackWork()
68 napi_resolve_deferred(env, asyncContext->deferred, result[1]); in SetCallbackWork()
70 napi_reject_deferred(env, asyncContext->deferred, result[0]); in SetCallbackWork()
116 napi_create_promise(env, &asyncContext->deferred, &result); in Set()
245 if (asyncContext->deferred) { in GetCallbackWork()
247 napi_resolve_deferred(env, asyncContext->deferred, result[1]); in GetCallbackWork()
249 napi_reject_deferred(env, asyncContext->deferred, result[0]); in GetCallbackWork()
300 napi_create_promise(env, &asyncContext->deferred, &result); in Get()
/base/time/time_service/framework/js/napi/common/src/
Dnapi_utils.cpp125 void NapiUtils::SetPromise(napi_env env, napi_deferred deferred, int32_t errorCode, const std::stri… in SetPromise() argument
129 NAPI_CALL_RETURN_VOID(env, napi_resolve_deferred(env, deferred, result)); in SetPromise()
132 …NAPI_CALL_RETURN_VOID(env, napi_reject_deferred(env, deferred, GetCallbackErrorValue(env, errorCod… in SetPromise()
155 SetPromise(env, info.deferred, info.errorCode, info.message, result); in ReturnCallbackPromise()
165 napi_deferred deferred = nullptr; in JSParaError() local
166 napi_create_promise(env, &deferred, &promise); in JSParaError()
167 …SetPromise(env, deferred, ERROR, NapiUtils::GetErrorMessage(JsErrorCode::PARAMETER_ERROR), NapiGet… in JSParaError()
/base/web/webview/interfaces/kits/napi/webstorage/
Dnapi_web_storage.cpp207 napi_resolve_deferred(env, param->deferred, args[1]); in GetOriginsPromiseComplete()
209 napi_reject_deferred(env, param->deferred, args[0]); in GetOriginsPromiseComplete()
224 .deferred = nullptr, in GetOriginsAsync()
241 napi_deferred deferred = nullptr; in GetOriginsPromise() local
243 napi_create_promise(env, &deferred, &promise); in GetOriginsPromise()
248 .deferred = deferred, in GetOriginsPromise()
363 napi_reject_deferred(env, param->deferred, args[PARAMZERO]); in GetOriginUsageOrQuotaPromiseComplete()
365 napi_resolve_deferred(env, param->deferred, args[PARAMONE]); in GetOriginUsageOrQuotaPromiseComplete()
386 .deferred = nullptr, in GetOriginUsageOrQuotaAsync()
405 napi_deferred deferred = nullptr; in GetOriginUsageOrQuotaPromise() local
[all …]
/base/notification/common_event_service/interfaces/kits/napi/common_event/src/
Dcommon_event.cpp341 void SetPromise(const napi_env &env, const napi_deferred &deferred, const int8_t &errorCode, const … in SetPromise() argument
344 napi_resolve_deferred(env, deferred, result); in SetPromise()
346 napi_reject_deferred(env, deferred, GetCallbackErrorValue(env, errorCode)); in SetPromise()
357 SetPromise(env, info.deferred, info.errorCode, result); in ReturnCallbackPromise()
370 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoCreateSubscriber() local
371 napi_create_promise(env, &deferred, &promise); in PaddingAsyncCallbackInfoCreateSubscriber()
372 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoCreateSubscriber()
551 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoGetSubscribeInfo() local
552 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in PaddingAsyncCallbackInfoGetSubscribeInfo()
553 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoGetSubscribeInfo()
[all …]
/base/account/os_account/interfaces/kits/napi/osaccount/src/
Dnapi_os_account.cpp194 napi_create_promise(env, &queryOAByIdCB->deferred, &result); in QueryOsAccountById()
227 napi_create_promise(env, &removeOACB->deferred, &result); in RemoveOsAccount()
255 napi_create_promise(env, &setOANameCB->deferred, &result); in SetOsAccountName()
288 napi_create_promise(env, &setOAConsCB->deferred, &result); in SetOsAccountConstraints()
321 napi_create_promise(env, &activeOACB->deferred, &result); in ActivateOsAccount()
354 napi_create_promise(env, &createOACB->deferred, &result); in CreateOsAccount()
382 napi_create_promise(env, &createOAForDomainCB->deferred, &result); in CreateOsAccountForDomain()
420 napi_create_promise(env, &getOACount->deferred, &result); in GetCreatedOsAccountsCountInner()
463 napi_create_promise(env, &dbDeviceId->deferred, &result); in GetDistributedVirtualDeviceIdInner()
506 napi_create_promise(env, &getAllConsCB->deferred, &result); in GetOsAccountAllConstraintsInner()
[all …]
/base/telephony/core_service/frameworks/js/napi/
Dbase_context.h30 napi_deferred deferred = nullptr; member
/base/security/huks/interfaces/kits/napi/src/v9/
Dhuks_napi_generate_key_item.cpp35 napi_deferred deferred = nullptr; member
98 NAPI_CALL(env, napi_create_promise(env, &context->deferred, &promise)); in GenerateKeyAsyncWork()
118 …HksReturnNapiResult(env, napiContext->callback, napiContext->deferred, napiContext->result, result… in GenerateKeyAsyncWork()

1234567