/base/location/interfaces/inner_api/include/ |
D | location_async_context.h | 46 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 …]
|
D | async_context.h | 28 napi_deferred deferred; variable 40 deferred = d;
|
D | locator_callback_host.h | 70 context->deferred = deferred_; in InitContext() 140 inline void SetDeferred(const napi_deferred& deferred) in SetDeferred() argument 142 deferred_ = deferred; in SetDeferred()
|
/base/notification/common_event_service/interfaces/kits/napi/common_event/src/ |
D | common_event_parse.cpp | 98 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoCreateSubscriber() local 99 napi_create_promise(env, &deferred, &promise); in PaddingAsyncCallbackInfoCreateSubscriber() 100 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoCreateSubscriber() 115 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoGetSubscribeInfo() local 116 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in PaddingAsyncCallbackInfoGetSubscribeInfo() 117 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoGetSubscribeInfo() 150 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoIsOrderedCommonEvent() local 151 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in PaddingAsyncCallbackInfoIsOrderedCommonEvent() 152 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoIsOrderedCommonEvent() 184 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoIsStickyCommonEvent() local [all …]
|
/base/notification/common_event_service/interfaces/kits/napi/napi_common_event/src/ |
D | common_event_parse.cpp | 137 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoCreateSubscriber() local 138 napi_create_promise(env, &deferred, &promise); in PaddingAsyncCallbackInfoCreateSubscriber() 139 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoCreateSubscriber() 153 napi_deferred deferred = nullptr; in PaddingCallbackPromiseInfo() local 154 napi_create_promise(env, &deferred, &promise); in PaddingCallbackPromiseInfo() 155 callbackInfo.deferred = deferred; in PaddingCallbackPromiseInfo() 188 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoGetSubscribeInfo() local 189 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in PaddingAsyncCallbackInfoGetSubscribeInfo() 190 asyncCallbackInfo->info.deferred = deferred; in PaddingAsyncCallbackInfoGetSubscribeInfo() 222 napi_deferred deferred = nullptr; in PaddingAsyncCallbackInfoIsOrderedCommonEvent() local [all …]
|
/base/web/webview/interfaces/kits/napi/webcookiemanager/ |
D | napi_web_cookie_manager.h | 106 NWebSaveCookieCallbackImpl(napi_env env, napi_ref callback, napi_deferred deferred) in NWebSaveCookieCallbackImpl() argument 107 : env_(env), callback_(callback), deferred_(deferred) {} in NWebSaveCookieCallbackImpl() 121 NWebCookieCallbackImpl(napi_env env, napi_ref callback, napi_deferred deferred) in NWebCookieCallbackImpl() argument 122 : env_(env), callback_(callback), deferred_(deferred) {} in NWebCookieCallbackImpl() 136 NWebFetchCookieCallbackImpl(napi_env env, napi_ref callback, napi_deferred deferred) in NWebFetchCookieCallbackImpl() argument 137 : env_(env), callback_(callback), deferred_(deferred) {} in NWebFetchCookieCallbackImpl() 151 NWebConfigCookieCallbackImpl(napi_env env, napi_ref callback, napi_deferred deferred) in NWebConfigCookieCallbackImpl() argument 152 : env_(env), callback_(callback), deferred_(deferred) {} in NWebConfigCookieCallbackImpl()
|
D | napi_web_cookie_manager.cpp | 138 void FetchCookieAsyncPromise(napi_env env, napi_deferred deferred, std::string url) in FetchCookieAsyncPromise() argument 144 napi_reject_deferred(env, deferred, jsResult); in FetchCookieAsyncPromise() 146 …o callbackImpl = std::make_shared<OHOS::NWeb::NWebFetchCookieCallbackImpl>(env, nullptr, deferred); in FetchCookieAsyncPromise() 190 napi_deferred deferred = nullptr; in JsFetchCookieAsync() local 192 napi_create_promise(env, &deferred, &promise); in JsFetchCookieAsync() 193 if (promise && deferred) { in JsFetchCookieAsync() 194 FetchCookieAsyncPromise(env, deferred, url); in JsFetchCookieAsync() 301 void ConfigCookieAsyncPromise(napi_env env, napi_deferred deferred, std::string url, std::string va… in ConfigCookieAsyncPromise() argument 307 napi_reject_deferred(env, deferred, jsResult); in ConfigCookieAsyncPromise() 309 … callbackImpl = std::make_shared<OHOS::NWeb::NWebConfigCookieCallbackImpl>(env, nullptr, deferred); in ConfigCookieAsyncPromise() [all …]
|
/base/notification/distributed_notification_service/frameworks/js/napi/src/ |
D | common_utils.cpp | 123 napi_deferred deferred = nullptr; in PaddingCallbackPromiseInfo() local 124 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in PaddingCallbackPromiseInfo() 125 info.deferred = deferred; in PaddingCallbackPromiseInfo() 136 SetPromise(env, info.deferred, info.errorCode, result, false); in ReturnCallbackPromise() 188 const napi_deferred &deferred, const int32_t &errorCode, const napi_value &result, bool newType) in SetPromise() argument 192 napi_resolve_deferred(env, deferred, result); in SetPromise() 194 napi_reject_deferred(env, deferred, CreateErrorValue(env, errorCode, newType)); in SetPromise() 205 napi_deferred deferred = nullptr; in JSParaError() local 206 napi_create_promise(env, &deferred, &promise); in JSParaError() 207 SetPromise(env, deferred, ERROR, Common::NapiGetNull(env), false); in JSParaError() [all …]
|
/base/web/webview/interfaces/kits/napi/webviewcontroller/ |
D | webview_hasimage_callback.h | 26 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);
|
D | webview_javascript_execute_callback.h | 74 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/ |
D | screenlock_callback.cpp | 76 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() 111 screenlockOnCallBack->deferred = eventListener_.deferred; in OnCallBack()
|
D | napi_screenlock_ability.cpp | 268 napi_deferred deferred; in NAPI_Lock() local 269 napi_create_promise(env, &deferred, &ret); in NAPI_Lock() 271 … EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::LOCK }; in NAPI_Lock() 314 napi_deferred deferred; in NAPI_UnlockScreen() local 315 napi_create_promise(env, &deferred, &ret); in NAPI_UnlockScreen() 317 …EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::UNLOCKSCREE… in NAPI_UnlockScreen() 358 napi_deferred deferred; in NAPI_Unlock() local 359 napi_create_promise(env, &deferred, &ret); in NAPI_Unlock() 361 … EventListener{ .env = env, .thisVar = thisVar, .deferred = deferred, .action = Action::UNLOCK }; in NAPI_Unlock()
|
/base/sensors/sensor/vibration_convert/interfaces/js/src/ |
D | vibrator_convert_js.cpp | 205 napi_deferred deferred = nullptr; in GetAudioAttribute() local 207 CHKCP((napi_create_promise(env, &deferred, &promise) == napi_ok), "napi_create_promise failed"); in GetAudioAttribute() 208 asyncCallbackInfo->deferred = deferred; in GetAudioAttribute() 248 napi_deferred deferred = nullptr; in GetAudioData() local 250 CHKCP((napi_create_promise(env, &deferred, &promise) == napi_ok), "napi_create_promise failed"); in GetAudioData() 251 asyncCallbackInfo->deferred = deferred; in GetAudioData() 291 napi_deferred deferred = nullptr; in ConvertAudioToHaptic() local 293 CHKCP((napi_create_promise(env, &deferred, &promise) == napi_ok), "napi_create_promise failed"); in ConvertAudioToHaptic() 294 asyncCallbackInfo->deferred = deferred; in ConvertAudioToHaptic()
|
/base/web/webview/interfaces/kits/napi/webasynccontroller/ |
D | napi_web_async_controller.cpp | 82 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/hiviewdfx/hiappevent/frameworks/js/napi/include/ |
D | napi_hiappevent_write.h | 28 napi_deferred deferred; member 38 this->deferred = nullptr; in HiAppEventAsyncContext()
|
/base/web/webview/interfaces/kits/napi/webdatabase/ |
D | napi_geolocation_permission.cpp | 43 napi_deferred deferred; member 56 napi_deferred deferred; member 248 napi_resolve_deferred(env, param->deferred, args[1]); in GetPermissionStatePromiseComplete() 250 napi_reject_deferred(env, param->deferred, args[0]); in GetPermissionStatePromiseComplete() 290 .deferred = nullptr, in GetPermissionStateAsync() 310 napi_deferred deferred = nullptr; in GetPermissionStatePromise() local 312 napi_create_promise(env, &deferred, &promise); in GetPermissionStatePromise() 320 .deferred = deferred, in GetPermissionStatePromise() 446 napi_resolve_deferred(env, param->deferred, args[1]); in GetOriginsPromiseComplete() 448 napi_reject_deferred(env, param->deferred, args[0]); in GetOriginsPromiseComplete() [all …]
|
/base/customization/enterprise_device_management/interfaces/kits/common/src/ |
D | napi_edm_common.cpp | 403 napi_resolve_deferred(env, asyncCallbackInfo->deferred, error); in NativeVoidCallbackComplete() 406 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeVoidCallbackComplete() 408 napi_reject_deferred(env, asyncCallbackInfo->deferred, in NativeVoidCallbackComplete() 438 napi_create_promise(env, &context->deferred, &result); in HandleAsyncWork() 459 if (asyncCallbackInfo->deferred != nullptr) { in NativeBoolCallbackComplete() 465 napi_resolve_deferred(env, asyncCallbackInfo->deferred, result); in NativeBoolCallbackComplete() 467 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeBoolCallbackComplete() 499 if (asyncCallbackInfo->deferred != nullptr) { in NativeNumberCallbackComplete() 505 napi_resolve_deferred(env, asyncCallbackInfo->deferred, result); in NativeNumberCallbackComplete() 507 … napi_reject_deferred(env, asyncCallbackInfo->deferred, CreateError(env, asyncCallbackInfo->ret)); in NativeNumberCallbackComplete() [all …]
|
/base/security/certificate_manager/interfaces/kits/napi/src/ |
D | cm_napi_uninstall_all_app_cert.cpp | 34 napi_deferred deferred = nullptr; member 94 GenerateNapiPromise(env, asyncContext->callback, &asyncContext->deferred, &promise); in UninstallAllAppCertAsyncWork() 118 if (context->deferred != nullptr) { in UninstallAllAppCertAsyncWork() 119 … GeneratePromise(env, context->deferred, context->result, result, CM_ARRAY_SIZE(result)); in UninstallAllAppCertAsyncWork()
|
D | cm_napi_grant.cpp | 39 napi_deferred deferred = nullptr; member 227 if (context->deferred != nullptr) { in GrantUidComplete() 228 GeneratePromise(env, context->deferred, context->errCode, result, CM_ARRAY_SIZE(result)); in GrantUidComplete() 253 if (context->deferred != nullptr) { in RemoveOrIsAuthedComplete() 254 GeneratePromise(env, context->deferred, context->errCode, result, CM_ARRAY_SIZE(result)); in RemoveOrIsAuthedComplete() 327 if (context->deferred != nullptr) { in GetUidListComplete() 328 GeneratePromise(env, context->deferred, context->errCode, result, CM_ARRAY_SIZE(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/ |
D | hiview_napi_adapter.cpp | 72 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/startup/init/interfaces/kits/jskits/src/ |
D | native_parameters_js.cpp | 31 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/web/webview/interfaces/kits/napi/webstorage/ |
D | napi_web_storage.cpp | 221 napi_resolve_deferred(env, param->deferred, args[1]); in GetOriginsPromiseComplete() 223 napi_reject_deferred(env, param->deferred, args[0]); in GetOriginsPromiseComplete() 238 .deferred = nullptr, in GetOriginsAsync() 255 napi_deferred deferred = nullptr; in GetOriginsPromise() local 257 napi_create_promise(env, &deferred, &promise); in GetOriginsPromise() 262 .deferred = deferred, in GetOriginsPromise() 377 napi_reject_deferred(env, param->deferred, args[PARAMZERO]); in GetOriginUsageOrQuotaPromiseComplete() 379 napi_resolve_deferred(env, param->deferred, args[PARAMONE]); in GetOriginUsageOrQuotaPromiseComplete() 400 .deferred = nullptr, in GetOriginUsageOrQuotaAsync() 419 napi_deferred deferred = nullptr; in GetOriginUsageOrQuotaPromise() local [all …]
|
/base/time/time_service/framework/js/napi/common/src/ |
D | napi_utils.cpp | 125 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/hiviewdfx/hiappevent/frameworks/js/napi/src/ |
D | napi_hiappevent_write.cpp | 83 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/account/os_account/interfaces/kits/napi/osaccount/src/ |
D | napi_os_account.cpp | 208 napi_create_promise(env, &queryOAByIdCB->deferred, &result); in QueryOsAccountById() 241 napi_create_promise(env, &removeOACB->deferred, &result); in RemoveOsAccount() 269 napi_create_promise(env, &setOANameCB->deferred, &result); in SetOsAccountName() 302 napi_create_promise(env, &setOAConsCB->deferred, &result); in SetOsAccountConstraints() 335 napi_create_promise(env, &activeOACB->deferred, &result); in ActivateOsAccount() 368 napi_create_promise(env, &createOACB->deferred, &result); in CreateOsAccount() 396 napi_create_promise(env, &createOAForDomainCB->deferred, &result); in CreateOsAccountForDomain() 434 napi_create_promise(env, &getOACount->deferred, &result); in GetCreatedOsAccountsCountInner() 477 napi_create_promise(env, &dbDeviceId->deferred, &result); in GetDistributedVirtualDeviceIdInner() 520 napi_create_promise(env, &getAllConsCB->deferred, &result); in GetOsAccountAllConstraintsInner() [all …]
|