/foundation/arkui/ace_engine_lite/frameworks/native_engine/async/test/unittest/common/ |
H A D | js_async_work_tdd_test.cpp | 91 AsyncWork *asyncWork = new AsyncWork(); in JsAsyncWorkTest003() local 92 EXPECT_TRUE(asyncWork != nullptr); in JsAsyncWorkTest003() 94 asyncWork->workHandler = Execute; in JsAsyncWorkTest003() 95 asyncWork->handler = ExecuteWithCode; in JsAsyncWorkTest003() 96 JsAsyncWork::ExecuteAsyncWork(asyncWork); in JsAsyncWorkTest003() 97 JsAsyncWork::ExecuteAsyncWork(asyncWork, JsAsyncWork::ERR_OK); in JsAsyncWorkTest003() 102 if (asyncWork != nullptr) { in JsAsyncWorkTest003() 103 delete asyncWork; in JsAsyncWorkTest003() 104 asyncWork = nullptr; in JsAsyncWorkTest003() 113 * @tc.steps: step1. call ExecuteAsyncWork with null asyncWork in JsAsyncWorkTest004() 115 AsyncWork *asyncWork = nullptr; JsAsyncWorkTest004() local 131 AsyncWork *asyncWork = new AsyncWork(); JsAsyncWorkTest005() local [all...] |
/foundation/arkui/ace_engine_lite/frameworks/native_engine/async/ |
H A D | js_async_work.cpp | 104 AsyncWork* asyncWork = new AsyncWork(); in DispatchAsyncWorkInner() 105 if (asyncWork == nullptr) { in DispatchAsyncWorkInner() 109 asyncWork->workHandler = workHandler; in DispatchAsyncWorkInner() 110 asyncWork->handler = handler; in DispatchAsyncWorkInner() 111 asyncWork->data = data; in DispatchAsyncWorkInner() 113 bool ret = DispatchToLoop(ASYNCWORK, static_cast<void *>(asyncWork)); in DispatchAsyncWorkInner() 116 delete(asyncWork); in DispatchAsyncWorkInner() 117 asyncWork = nullptr; in DispatchAsyncWorkInner() 123 void JsAsyncWork::ExecuteAsyncWork(AsyncWork *&asyncWork, int8_t statusCode) in ExecuteAsyncWork() argument 125 if (asyncWork in ExecuteAsyncWork() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/audio_manager/ |
H A D | napi_bluetooth_audio_manager.cpp | 62 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in EnableWearDetection() local 63 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in EnableWearDetection() 64 asyncWork->Run();
in EnableWearDetection() 65 return asyncWork->GetRet();
in EnableWearDetection() 80 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in DisableWearDetection() local 81 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in DisableWearDetection() 82 asyncWork->Run();
in DisableWearDetection() 83 return asyncWork->GetRet();
in DisableWearDetection() 102 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in IsWearDetectionEnabled() local 103 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERRO in IsWearDetectionEnabled() 123 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); IsWearDetectionSupported() local [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/pbap/ |
H A D | napi_bluetooth_pbap_pse.cpp | 210 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SetConnectionStrategy() local 211 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in SetConnectionStrategy() 212 asyncWork->Run();
in SetConnectionStrategy() 213 return asyncWork->GetRet();
in SetConnectionStrategy() 232 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in GetConnectionStrategy() local 233 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in GetConnectionStrategy() 234 asyncWork->Run();
in GetConnectionStrategy() 235 return asyncWork->GetRet();
in GetConnectionStrategy() 272 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SetShareType() local 273 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERRO in SetShareType() 294 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetShareType() local 315 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); SetPhoneBookAccessAuthorization() local 337 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetPhoneBookAccessAuthorization() local [all...] |
/foundation/arkui/napi/sample/native_module_demo/ |
H A D | native_module_demo.cpp | 54 napi_async_work asyncWork = nullptr; member 69 .asyncWork = nullptr, in TestPromise() 82 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in TestPromise() 85 (void*)asyncCallbackInfo, &asyncCallbackInfo->asyncWork); in TestPromise() 86 napi_queue_async_work(env, asyncCallbackInfo->asyncWork); in TestPromise() 125 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in NapiCreateAsyncWork() 128 (void*)asyncCallbackInfo, &asyncCallbackInfo->asyncWork); in NapiCreateAsyncWork() 140 .asyncWork = nullptr, in TestPromiseOrAsyncCallback() 156 NAPI_CALL(env, napi_queue_async_work(env, asyncCallbackInfo->asyncWork)); in TestPromiseOrAsyncCallback() 179 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in TestPromiseOrAsyncCallback() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/common/ |
H A D | napi_async_work.cpp | 27 std::function<NapiAsyncWorkRet(void)> asyncWork, bool needCallback) in CreateAsyncWork() 34 auto napiAsyncWork = std::make_shared<NapiAsyncWork>(env, asyncWork, asyncCallback, needCallback); in CreateAsyncWork() 115 napi_delete_async_work(env, info->asyncWork); in Run() 118 static_cast<void *>(info), &info->asyncWork); in Run() 125 status = napi_queue_async_work(env_, info->asyncWork); in Run() 128 napi_delete_async_work(env_, info->asyncWork); in Run() 178 auto asyncWork = map.Get(type); in AsyncWorkCallFunction() local 179 if (!asyncWork) { in AsyncWorkCallFunction() 185 asyncWork->CallFunction(status, nativeObject); in AsyncWorkCallFunction() 188 bool NapiAsyncWorkMap::TryPush(NapiAsyncType type, std::shared_ptr<NapiAsyncWork> asyncWork) in TryPush() argument 26 CreateAsyncWork(napi_env env, napi_callback_info info, std::function<NapiAsyncWorkRet(void)> asyncWork, bool needCallback) CreateAsyncWork() argument [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_file/class_file/ |
H A D | file_n_exporter.h | 45 napi_async_work asyncWork = nullptr; member 54 napi_async_work asyncWork = nullptr; member 64 napi_async_work asyncWork = nullptr; member 74 napi_async_work asyncWork = nullptr; member 89 napi_async_work asyncWork = nullptr; member 101 napi_async_work asyncWork = nullptr; member 112 napi_async_work asyncWork = nullptr; member 123 napi_async_work asyncWork = nullptr; member 132 napi_async_work asyncWork = nullptr; member 143 napi_async_work asyncWork member 157 napi_async_work asyncWork = nullptr; global() member 167 napi_async_work asyncWork = nullptr; global() member [all...] |
H A D | file_n_exporter.cpp | 286 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in MkdirComp() 322 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in RmdirComp() 386 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in GetComp() 462 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in ListComp() 571 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in CopyComp() 680 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in MoveComp() 713 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in DeleteComp() 746 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in AccessComp() 786 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in WriteTextComp() 831 napi_delete_async_work(env, asyncCallbackInfo->asyncWork); in WriteArrayBufferComp() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/map/ |
H A D | napi_bluetooth_map_mse.cpp | 177 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SetConnectionStrategy() local 178 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in SetConnectionStrategy() 179 asyncWork->Run();
in SetConnectionStrategy() 180 return asyncWork->GetRet();
in SetConnectionStrategy() 199 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in GetConnectionStrategy() local 200 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in GetConnectionStrategy() 201 asyncWork->Run();
in GetConnectionStrategy() 202 return asyncWork->GetRet();
in GetConnectionStrategy() 219 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SetMessageAccessAuthorization() local 220 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERRO in SetMessageAccessAuthorization() 240 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetMessageAccessAuthorization() local [all...] |
/foundation/filemanagement/dfs_service/utils/work/src/ |
H A D | async_work.cpp | 25 std::unique_ptr<NAsyncWork> asyncWork = nullptr; in GetPromiseOrCallBackWork() local 28 asyncWork = std::make_unique<NAsyncWorkPromise>(env, thisVar); in GetPromiseOrCallBackWork() 32 asyncWork = std::make_unique<NAsyncWorkCallback>(env, thisVar, cb); in GetPromiseOrCallBackWork() 38 return asyncWork; in GetPromiseOrCallBackWork()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/connection/ |
H A D | napi_bluetooth_connection.cpp | 440 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in SetDevicePinCode() local 441 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in SetDevicePinCode() 442 asyncWork->Run(); in SetDevicePinCode() 443 return asyncWork->GetRet(); in SetDevicePinCode() 469 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in PairDeviceAsync() local 470 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in PairDeviceAsync() 471 asyncWork->Run(); in PairDeviceAsync() 472 return asyncWork->GetRet(); in PairDeviceAsync() 489 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in CancelPairedDeviceAsync() local 490 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERRO in CancelPairedDeviceAsync() 508 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); CancelPairingDevice() local 540 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); PairCredibleDevice() local 566 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetLocalProfileUuids() local 586 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetRemoteProfileUuids() local 634 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); ConnectAllowedProfiles() local 653 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); DisconnectAllowedProfiles() local 710 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); SetRemoteDeviceName() local 747 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); SetRemoteDeviceType() local 767 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetRemoteDeviceType() local 787 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetRemoteDeviceBatteryInfo() local [all...] |
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/common/ |
H A D | base_cb_info.cpp | 30 if (asyncWork) { in ~AsyncWorkData() 31 APP_LOGD("AsyncWorkData::~AsyncWorkData delete asyncWork"); in ~AsyncWorkData() 32 napi_delete_async_work(env, asyncWork); in ~AsyncWorkData() 33 asyncWork = nullptr; in ~AsyncWorkData()
|
/foundation/filemanagement/dfs_service/interfaces/kits/js/cloudsyncmanager/ |
H A D | cloud_sync_manager_n_exporter.cpp | 83 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::FOUR)); in ChangeAppCloudSwitch() local 84 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbComplete).val_; in ChangeAppCloudSwitch() 125 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::THREE)); in NotifyDataChangeInner() local 126 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbComplete).val_; in NotifyDataChangeInner() 188 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::THREE)); in NotifyEventChange() local 189 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbComplete).val_; in NotifyEventChange() 243 auto asyncWork in DisableCloud() local 325 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::THREE)); EnableCloud() local 402 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::THREE)); Clean() local [all...] |
/foundation/ability/ability_runtime/frameworks/js/napi/featureAbility/ |
H A D | napi_data_ability_helper_utils.cpp | 54 &insertCB->cbBase.asyncWork)); in InsertAsync() 55 NAPI_CALL(env, napi_queue_async_work_with_qos(env, insertCB->cbBase.asyncWork, napi_qos_user_initiated)); in InsertAsync() 83 &insertCB->cbBase.asyncWork)); in InsertPromise() 84 NAPI_CALL(env, napi_queue_async_work_with_qos(env, insertCB->cbBase.asyncWork, napi_qos_user_initiated)); in InsertPromise() 129 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, insertCB->cbBase.asyncWork)); in InsertAsyncCompleteCB() 142 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, insertCB->cbBase.asyncWork)); in InsertPromiseCompleteCB() 172 ¬ifyChangeCB->cbBase.asyncWork)); in NotifyChangeAsync() 173 NAPI_CALL(env, napi_queue_async_work(env, notifyChangeCB->cbBase.asyncWork)); in NotifyChangeAsync() 200 ¬ifyChangeCB->cbBase.asyncWork)); in NotifyChangePromise() 201 NAPI_CALL(env, napi_queue_async_work(env, notifyChangeCB->cbBase.asyncWork)); in NotifyChangePromise() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/ble/ |
H A D | napi_bluetooth_gatt_client.cpp | 305 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NEED_CALLBACK); in ReadCharacteristicValue() local 306 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in ReadCharacteristicValue() 307 bool success = client->GetCallback()->asyncWorkMap_.TryPush(NapiAsyncType::GATT_CLIENT_READ_CHARACTER, asyncWork); in ReadCharacteristicValue() 310 asyncWork->Run(); in ReadCharacteristicValue() 311 return asyncWork->GetRet(); in ReadCharacteristicValue() 358 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NEED_CALLBACK); in ReadDescriptorValue() local 359 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in ReadDescriptorValue() 360 bool success = client->GetCallback()->asyncWorkMap_.TryPush(NapiAsyncType::GATT_CLIENT_READ_DESCRIPTOR, asyncWork); in ReadDescriptorValue() 363 asyncWork->Run(); in ReadDescriptorValue() 364 return asyncWork in ReadDescriptorValue() 403 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetServices() local 491 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NEED_CALLBACK); GetRssiValue() local 526 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetDeviceName() local 585 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork( WriteCharacteristicValueEx() local 639 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NEED_CALLBACK); WriteDescriptorValueEx() local 695 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NEED_CALLBACK); setCharacteristicChangeInner() local [all...] |
/foundation/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/include/ |
H A D | js_systemload.h | 47 if (asyncWork) { in ~SystemloadLevelCbInfo() 48 napi_delete_async_work(nativeEnv, asyncWork); in ~SystemloadLevelCbInfo() 49 asyncWork = nullptr; in ~SystemloadLevelCbInfo() 54 napi_async_work asyncWork = nullptr; member
|
/foundation/communication/bluetooth/frameworks/js/napi/src/a2dp/ |
H A D | napi_bluetooth_a2dp_src.cpp | 420 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in SetConnectionStrategy() local 421 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in SetConnectionStrategy() 422 asyncWork->Run(); in SetConnectionStrategy() 423 return asyncWork->GetRet(); in SetConnectionStrategy() 443 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in GetConnectionStrategy() local 444 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in GetConnectionStrategy() 445 asyncWork->Run(); in GetConnectionStrategy() 446 return asyncWork->GetRet(); in GetConnectionStrategy() 474 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in IsAbsoluteVolumeSupported() local 475 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERRO in IsAbsoluteVolumeSupported() 496 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); IsAbsoluteVolumeEnabled() local 515 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); EnableAbsoluteVolume() local 534 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); DisableAbsoluteVolume() local 696 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); EnableAutoPlay() local 735 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); DisableAutoPlay() local 756 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); GetAutoPlayDisabledDuration() local [all...] |
/foundation/ability/ability_runtime/frameworks/js/napi/inner/napi_ability_common/ |
H A D | napi_common_ability_execute_utils.cpp | 84 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, appTypeCB->cbBase.asyncWork)); in GetAppTypeAsyncCompleteCB() 109 napi_delete_async_work(env, appTypeCB->cbBase.asyncWork); in GetAppTypePromiseCompleteCB() 147 &appTypeCB->cbBase.asyncWork)); in GetAppTypeAsync() 148 NAPI_CALL(env, napi_queue_async_work_with_qos(env, appTypeCB->cbBase.asyncWork, napi_qos_user_initiated)); in GetAppTypeAsync() 184 &appTypeCB->cbBase.asyncWork)); in GetAppTypePromise() 185 NAPI_CALL(env, napi_queue_async_work_with_qos(env, appTypeCB->cbBase.asyncWork, napi_qos_user_initiated)); in GetAppTypePromise() 291 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, abilityInfoCB->cbBase.asyncWork)); in GetAbilityInfoAsyncCompleteCB() 316 napi_delete_async_work(env, abilityInfoCB->cbBase.asyncWork); in GetAbilityInfoPromiseCompleteCB() 354 &abilityInfoCB->cbBase.asyncWork)); in GetAbilityInfoAsync() 355 NAPI_CALL(env, napi_queue_async_work_with_qos(env, abilityInfoCB->cbBase.asyncWork, napi_qos_user_initiate in GetAbilityInfoAsync() [all...] |
/foundation/filemanagement/dfs_service/interfaces/kits/js/cloudfilesync/ |
H A D | cloud_file_cache_napi.cpp | 174 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::TWO)); in StartFileCache() local 175 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbCompl).val_; in StartFileCache() 223 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, maxArgSize); in StopFileCache() local 224 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbCompl).val_; in StopFileCache() 268 auto asyncWork = GetPromiseOrCallBackWork(env, funcArg, static_cast<size_t>(NARG_CNT::TWO)); in StartBatchFileCache() local 269 return asyncWork == nullptr ? nullptr : asyncWork->Schedule(procedureName, cbExec, cbCompl).val_; in StartBatchFileCache() 321 auto asyncWork in StopBatchFileCache() local [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/hid/ |
H A D | napi_bluetooth_hid_host.cpp | 215 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in SetConnectionStrategy() local 216 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in SetConnectionStrategy() 217 asyncWork->Run(); in SetConnectionStrategy() 218 return asyncWork->GetRet(); in SetConnectionStrategy() 237 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in GetConnectionStrategy() local 238 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in GetConnectionStrategy() 239 asyncWork->Run(); in GetConnectionStrategy() 240 return asyncWork->GetRet(); in GetConnectionStrategy()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/opp/ |
H A D | napi_bluetooth_opp.cpp | 146 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SendFile() local 147 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in SendFile() 148 asyncWork->Run();
in SendFile() 149 return asyncWork->GetRet();
in SendFile() 166 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK);
in SetIncomingFileConfirmation() local 167 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR);
in SetIncomingFileConfirmation() 168 asyncWork->Run();
in SetIncomingFileConfirmation() 169 return asyncWork->GetRet();
in SetIncomingFileConfirmation()
|
/foundation/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/src/ |
H A D | js_systemload.cpp | 97 &cbInfo->asyncWork)); in OnSystemloadLevel() 98 NAPI_CALL_RETURN_VOID(env, napi_queue_async_work(env, cbInfo->asyncWork)); in OnSystemloadLevel() 195 &cbInfo->asyncWork)); in GetSystemloadLevel() 196 NAPI_CALL(env, napi_queue_async_work(env, cbInfo->asyncWork)); in GetSystemloadLevel() 226 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, cbInfo->asyncWork)); in Complete() 227 cbInfo->asyncWork = nullptr; in Complete() 250 NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, cbInfo->asyncWork)); in CompleteCb() 251 cbInfo->asyncWork = nullptr; in CompleteCb()
|
/foundation/multimedia/player_framework/frameworks/js/player/ |
H A D | video_callback_napi.cpp | 254 AsyncWorkType asyncWork = AsyncWorkType::ASYNC_WORK_INVALID; in DequeueAsyncWork() local 257 asyncWork = AsyncWorkType::ASYNC_WORK_PREPARE; in DequeueAsyncWork() 260 asyncWork = AsyncWorkType::ASYNC_WORK_PLAY; in DequeueAsyncWork() 263 asyncWork = AsyncWorkType::ASYNC_WORK_PAUSE; in DequeueAsyncWork() 266 asyncWork = AsyncWorkType::ASYNC_WORK_STOP; in DequeueAsyncWork() 269 asyncWork = AsyncWorkType::ASYNC_WORK_RESET; in DequeueAsyncWork() 275 if (contextMap_.find(asyncWork) == contextMap_.end() || in DequeueAsyncWork() 276 contextMap_.at(asyncWork).empty()) { in DequeueAsyncWork() 281 VideoPlayerAsyncContext *context = contextMap_.at(asyncWork).front(); in DequeueAsyncWork() 284 contextMap_.at(asyncWork) in DequeueAsyncWork() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/include/ |
H A D | napi_async_work.h | 68 napi_async_work asyncWork; member 89 std::function<NapiAsyncWorkRet(void)> asyncWork, bool needCallback = ASYNC_WORK_NO_NEED_CALLBACK); 94 bool TryPush(NapiAsyncType type, std::shared_ptr<NapiAsyncWork> asyncWork);
|
/foundation/communication/bluetooth/frameworks/js/napi/src/hfp/ |
H A D | napi_bluetooth_hfp_ag.cpp | 380 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in SetConnectionStrategy() local 381 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in SetConnectionStrategy() 382 asyncWork->Run(); in SetConnectionStrategy() 383 return asyncWork->GetRet(); in SetConnectionStrategy() 402 auto asyncWork = NapiAsyncWorkFactory::CreateAsyncWork(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); in GetConnectionStrategy() local 403 NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); in GetConnectionStrategy() 404 asyncWork->Run(); in GetConnectionStrategy() 405 return asyncWork->GetRet(); in GetConnectionStrategy()
|