/base/inputmethod/imf/frameworks/js/napi/inputmethodclient/ |
D | async_call.cpp | 68 napi_value promise = nullptr; in Call() local 70 napi_create_promise(env, &context_->defer, &promise); in Call() 72 napi_get_undefined(env, &promise); in Call() 82 return promise; in Call() 92 napi_value promise = nullptr; in SyncCall() local 94 napi_create_promise(env, &context_->defer, &promise); in SyncCall() 96 napi_get_undefined(env, &promise); in SyncCall() 100 return promise; in SyncCall()
|
/base/request/request/frameworks/js/napi/src/upload/ |
D | async_call.cpp | 61 napi_value promise = nullptr; in Call() local 63 napi_create_promise(env, &context_->defer, &promise); in Call() 65 napi_get_undefined(env, &promise); in Call() 75 return promise; in Call() 85 napi_value promise = nullptr; in SyncCall() local 87 napi_create_promise(env, &context_->defer, &promise); in SyncCall() 89 napi_get_undefined(env, &promise); in SyncCall() 94 return promise; in SyncCall()
|
/base/time/time_service/framework/js/napi/system_time/src/ |
D | js_systemtime.cpp | 46 napi_value &promise) in TimePaddingAsyncCallbackInfo() argument 53 NAPI_CALL_RETURN_VOID(env, napi_create_promise(env, &deferred, &promise)); in TimePaddingAsyncCallbackInfo() 74 napi_value promise = nullptr; in JSSystemTimeSetTime() local 75 TimePaddingAsyncCallbackInfo(env, asyncContext, callback, promise); in JSSystemTimeSetTime() 108 return promise; in JSSystemTimeSetTime() 127 napi_value promise = nullptr; in JSSystemTimeSetTimeZone() local 128 TimePaddingAsyncCallbackInfo(env, asyncContext, callback, promise); in JSSystemTimeSetTimeZone() 161 return promise; in JSSystemTimeSetTimeZone() 180 napi_value promise = nullptr; in JSSystemTimeGetCurrentTime() local 181 TimePaddingAsyncCallbackInfo(env, asyncContext, callback, promise); in JSSystemTimeGetCurrentTime() [all …]
|
/base/sensors/miscdevice/interfaces/plugin/vibrator/test/unittest/ |
D | ExampleJsunit.test.js | 254 let promise = new Promise((resolve, reject) => { 268 await promise.then(() => { 308 let promise = new Promise((resolve, reject) => { 326 await promise.then(() => { 483 let promise = new Promise((resolve, reject) => { 495 await promise.then(() => { 584 let promise = new Promise((resolve, reject) => { 600 await promise.then(() => { 990 let promise = new Promise((resolve, reject) => { 1002 await promise.then(() => { [all …]
|
/base/notification/distributed_notification_service/frameworks/js/napi/src/manager/ |
D | napi_distributed.cpp | 63 napi_value promise = nullptr; in NapiIsDistributedEnabled() local 64 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiIsDistributedEnabled() 104 return promise; in NapiIsDistributedEnabled() 123 napi_value promise = nullptr; in NapiEnableDistributed() local 124 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiEnableDistributed() 175 return promise; in NapiEnableDistributed() 194 napi_value promise = nullptr; in NapiEnableDistributedByBundle() local 195 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiEnableDistributedByBundle() 245 return promise; in NapiEnableDistributedByBundle() 264 napi_value promise = nullptr; in NapiEnableDistributedSelf() local [all …]
|
D | napi_slot.cpp | 42 napi_value promise = nullptr; in NapiAddSlot() local 43 Common::PaddingCallbackPromiseInfo(env, paras.callback, asynccallbackinfo->info, promise); in NapiAddSlot() 96 return promise; in NapiAddSlot() 114 napi_value promise = nullptr; in NapiAddSlots() local 115 Common::PaddingCallbackPromiseInfo(env, paras.callback, asynccallbackinfo->info, promise); in NapiAddSlots() 163 return promise; in NapiAddSlots() 181 napi_value promise = nullptr; in NapiSetSlotByBundle() local 182 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiSetSlotByBundle() 231 return promise; in NapiSetSlotByBundle() 280 napi_value promise = nullptr; in NapiGetSlot() local [all …]
|
D | napi_cancel.cpp | 37 napi_value promise = nullptr; in NapiCancel() local 38 Common::PaddingCallbackPromiseInfo(env, paras.callback, asynccallbackinfo->info, promise); in NapiCancel() 88 return promise; in NapiCancel() 105 napi_value promise = nullptr; in NapiCancelAll() local 106 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiCancelAll() 154 return promise; in NapiCancelAll() 172 napi_value promise = nullptr; in NapiCancelGroup() local 173 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiCancelGroup() 224 return promise; in NapiCancelGroup() 246 napi_value promise = nullptr; in NapiCancelAsBundle() local [all …]
|
D | napi_disturb_mode.cpp | 37 napi_value promise = nullptr; in NapiSetDoNotDisturbDate() local 38 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiSetDoNotDisturbDate() 93 return promise; in NapiSetDoNotDisturbDate() 138 napi_value promise = nullptr; in NapiGetDoNotDisturbDate() local 139 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiGetDoNotDisturbDate() 186 return promise; in NapiGetDoNotDisturbDate() 207 napi_value promise = nullptr; in NapiSupportDoNotDisturbMode() local 208 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiSupportDoNotDisturbMode() 263 return promise; in NapiSupportDoNotDisturbMode()
|
D | napi_enable_notification.cpp | 58 napi_value promise = nullptr; in NapiEnableNotification() local 59 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiEnableNotification() 98 return promise; in NapiEnableNotification() 137 napi_value promise = nullptr; in NapiIsNotificationEnabled() local 138 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiIsNotificationEnabled() 189 return promise; in NapiIsNotificationEnabled() 207 napi_value promise = nullptr; in NapiIsNotificationEnabledSelf() local 208 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiIsNotificationEnabledSelf() 251 return promise; in NapiIsNotificationEnabledSelf() 269 napi_value promise = nullptr; in NapiRequestEnableNotification() local [all …]
|
D | napi_display_badge.cpp | 39 napi_value promise = nullptr; in NapiDisplayBadge() local 40 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiDisplayBadge() 94 return promise; in NapiDisplayBadge() 134 napi_value promise = nullptr; in NapiIsBadgeDisplayed() local 135 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiIsBadgeDisplayed() 182 return promise; in NapiIsBadgeDisplayed() 253 napi_value promise = nullptr; in NapiSetBadgeNumber() local 254 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiSetBadgeNumber() 292 return promise; in NapiSetBadgeNumber()
|
D | napi_get_active.cpp | 84 napi_value promise = nullptr; in NapiGetAllActiveNotifications() local 85 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiGetAllActiveNotifications() 123 return promise; in NapiGetAllActiveNotifications() 188 napi_value promise = nullptr; in NapiGetActiveNotifications() local 189 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiGetActiveNotifications() 227 return promise; in NapiGetActiveNotifications() 270 napi_value promise = nullptr; in NapiGetActiveNotificationCount() local 271 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiGetActiveNotificationCount() 310 return promise; in NapiGetActiveNotificationCount()
|
D | napi_template.cpp | 37 napi_value promise = nullptr; in NapiIsSupportTemplate() local 38 Common::PaddingCallbackPromiseInfo(env, params.callback, asyncCallbackinfo->info, promise); in NapiIsSupportTemplate() 90 return promise; in NapiIsSupportTemplate()
|
/base/security/device_security_level/interfaces/inner_api/src/standard/ |
D | device_security_info.cpp | 78 std::promise<DeviceSecurityInfo *> promise; in RequestDeviceSecurityInfoImpl() local 80 auto callback = [&promise](const DeviceIdentify *identify, struct DeviceSecurityInfo *info) { in RequestDeviceSecurityInfoImpl() 81 promise.set_value(info); in RequestDeviceSecurityInfoImpl() 89 *info = promise.get_future().get(); in RequestDeviceSecurityInfoImpl()
|
/base/theme/screenlock_mgr/frameworks/js/napi/src/ |
D | async_call.cpp | 74 napi_value promise = nullptr; in Call() local 76 napi_create_promise(env, &context_->defer, &promise); in Call() 78 napi_get_undefined(env, &promise); in Call() 89 return promise; in Call() 99 napi_value promise = nullptr; in SyncCall() local 101 napi_create_promise(env, &context_->defer, &promise); in SyncCall() 103 napi_get_undefined(env, &promise); in SyncCall() 108 return promise; in SyncCall()
|
/base/print/print_fwk/interfaces/kits/napi/src/ |
D | print_async_call.cpp | 59 napi_value promise = nullptr; in Call() local 61 napi_create_promise(env, &context_->defer, &promise); in Call() 63 napi_get_undefined(env, &promise); in Call() 74 return promise; in Call() 82 napi_value promise = nullptr; in SyncCall() local 84 napi_create_promise(env, &context_->defer, &promise); in SyncCall() 86 napi_get_undefined(env, &promise); in SyncCall() 90 return promise; in SyncCall()
|
/base/msdp/device_status/services/delegate_task/include/ |
D | delegate_tasks.h | 40 using Promise = std::promise<int32_t>; 43 Task(int32_t id, DTaskCallback fun, Promise *promise = nullptr) 44 : id_(id), fun_(fun), promise_(promise) {} in id_() 95 TaskPtr PostTask(DTaskCallback callback, Promise *promise = nullptr);
|
/base/msdp/device_status/services/delegate_task/src/ |
D | delegate_tasks.cpp | 103 Promise promise; in PostSyncTask() local 104 Future future = promise.get_future(); in PostSyncTask() 105 auto task = PostTask(callback, &promise); in PostSyncTask() 146 DelegateTasks::TaskPtr DelegateTasks::PostTask(DTaskCallback callback, Promise *promise) in PostTask() argument 164 TaskPtr task = std::make_shared<Task>(id, callback, promise); in PostTask() 166 std::string taskType = ((promise == nullptr) ? "Async" : "Sync"); in PostTask()
|
/base/sensors/miscdevice/interfaces/plugin/vibrator/src/ |
D | vibrator_js.cpp | 78 napi_value promise = nullptr; in VibrateTime() local 79 NAPI_CALL(env, napi_create_promise(env, &deferred, &promise)); in VibrateTime() 82 return promise; in VibrateTime() 101 napi_value promise = nullptr; in VibrateEffectId() local 102 NAPI_CALL(env, napi_create_promise(env, &deferred, &promise)); in VibrateEffectId() 105 return promise; in VibrateEffectId() 243 napi_value promise = nullptr; in VibrateEffect() local 244 CHKCP((napi_create_promise(env, &deferred, &promise) == napi_ok), "napi_create_promise fail"); in VibrateEffect() 247 return promise; in VibrateEffect() 309 napi_value promise = nullptr; in Cancel() local [all …]
|
/base/customization/enterprise_device_management/services/edm_plugin/include/utils/ |
D | installer_callback.h | 36 std::promise<int32_t> resultCodeSignal_; 37 std::promise<std::string> resultMsgSignal_;
|
/base/notification/distributed_notification_service/frameworks/js/napi/src/ |
D | get_active.cpp | 82 napi_value promise = nullptr; in GetAllActiveNotifications() local 83 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in GetAllActiveNotifications() 119 return promise; in GetAllActiveNotifications() 185 napi_value promise = nullptr; in GetActiveNotifications() local 186 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in GetActiveNotifications() 222 return promise; in GetActiveNotifications() 266 napi_value promise = nullptr; in GetActiveNotificationCount() local 267 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in GetActiveNotificationCount() 304 return promise; in GetActiveNotificationCount()
|
D | enable_notification.cpp | 153 napi_value promise = nullptr; in EnableNotification() local 154 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in EnableNotification() 191 return promise; in EnableNotification() 234 napi_value promise = nullptr; in IsNotificationEnabled() local 235 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in IsNotificationEnabled() 284 return promise; in IsNotificationEnabled() 302 napi_value promise = nullptr; in IsNotificationEnabledSelf() local 303 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in IsNotificationEnabledSelf() 344 return promise; in IsNotificationEnabledSelf() 363 napi_value promise = nullptr; in RequestEnableNotification() local [all …]
|
D | distributed.cpp | 189 napi_value promise = nullptr; in IsDistributedEnabled() local 190 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in IsDistributedEnabled() 228 return promise; in IsDistributedEnabled() 246 napi_value promise = nullptr; in EnableDistributed() local 247 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in EnableDistributed() 296 return promise; in EnableDistributed() 314 napi_value promise = nullptr; in EnableDistributedByBundle() local 315 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in EnableDistributedByBundle() 363 return promise; in EnableDistributedByBundle() 381 napi_value promise = nullptr; in EnableDistributedSelf() local [all …]
|
/base/notification/distributed_notification_service/frameworks/js/napi/src/subscribe/ |
D | napi_remove.cpp | 77 napi_value promise = nullptr; in NapiRemove() local 78 Common::PaddingCallbackPromiseInfo(env, params.callback, removeInfo->info, promise); in NapiRemove() 90 return promise; in NapiRemove() 108 napi_value promise = nullptr; in NapiRemoveAll() local 109 Common::PaddingCallbackPromiseInfo(env, params.callback, asynccallbackinfo->info, promise); in NapiRemoveAll() 165 return promise; in NapiRemoveAll()
|
D | napi_subscribe.cpp | 49 napi_value promise = nullptr; in NapiSubscribe() local 50 Common::PaddingCallbackPromiseInfo(env, callback, asynccallbackinfo->info, promise); in NapiSubscribe() 118 return promise; in NapiSubscribe() 136 napi_value promise = nullptr; in NapiUnsubscribe() local 137 Common::PaddingCallbackPromiseInfo(env, paras.callback, asynccallbackinfo->info, promise); in NapiUnsubscribe() 201 return promise; in NapiUnsubscribe()
|
/base/powermgr/battery_statistics/frameworks/napi/src/ |
D | battery_stats.cpp | 62 napi_value promise; in StatsPromise() local 63 asyncInfo->CreatePromise(env_, promise); in StatsPromise() 64 STATS_RETURN_IF_WITH_RET(promise == nullptr, nullptr); in StatsPromise() 67 …ASE(env_, napi_create_string_utf8(env_, "StatsPromise", NAPI_AUTO_LENGTH, &resourceName), promise); in StatsPromise() 89 …(env_, napi_queue_async_work_with_qos(env_, asyncInfo->GetAsyncWork(), napi_qos_utility), promise); in StatsPromise() 91 return promise; in StatsPromise()
|