Home
last modified time | relevance | path

Searched refs:asyncContext (Results 1 – 25 of 63) sorted by relevance

123

/base/account/os_account/interfaces/kits/napi/osaccount/src/
Dnapi_os_account_common.cpp47 auto *asyncContext = new (std::nothrow) CreateOAForDomainAsyncContext(); in OnResult() local
48 if (asyncContext == nullptr) { in OnResult()
52 asyncContext->osAccountInfos = *osAccountInfo; in OnResult()
53 asyncContext->errCode = errCode; in OnResult()
54 asyncContext->env = env_; in OnResult()
55 asyncContext->callbackRef = callbackRef_; in OnResult()
56 asyncContext->deferred = deferred_; in OnResult()
57 work->data = reinterpret_cast<void *>(asyncContext); in OnResult()
62 delete asyncContext; in OnResult()
77 …bool ParseOneParaContext(napi_env env, napi_callback_info cbInfo, CommonAsyncContext *asyncContext) in ParseOneParaContext() argument
[all …]
/base/time/time_service/framework/js/napi/system_time/src/
Djs_systemtime.cpp70 AsyncContext *asyncContext = new (std::nothrow) AsyncContext{ .env = env, .time = times }; in JSSystemTimeSetTime()
71 if (!asyncContext) { in JSSystemTimeSetTime()
75 TimePaddingAsyncCallbackInfo(env, asyncContext, callback, promise); in JSSystemTimeSetTime()
81 AsyncContext *asyncContext = (AsyncContext *)data; in JSSystemTimeSetTime() local
83asyncContext->isOK = TimeServiceClient::GetInstance()->SetTime(asyncContext->time, errorCode); in JSSystemTimeSetTime()
84 if (!asyncContext->isOK) { in JSSystemTimeSetTime()
86 asyncContext->message = NapiUtils::GetErrorMessage(jsErrorCode); in JSSystemTimeSetTime()
87 asyncContext->errorCode = JsErrorCode::ERROR; in JSSystemTimeSetTime()
91 AsyncContext *asyncContext = (AsyncContext *)data; in JSSystemTimeSetTime() local
92 if (asyncContext == nullptr) { in JSSystemTimeSetTime()
[all …]
/base/account/os_account/interfaces/kits/napi/appaccount/src/
Dnapi_app_account.cpp165 auto asyncContext = std::make_unique<AppAccountAsyncContext>(env); in AddAccount() local
166 ParseContextWithExInfo(env, cbInfo, asyncContext.get()); in AddAccount()
168 if (asyncContext->callbackRef == nullptr) { in AddAccount()
169 napi_create_promise(env, &asyncContext->deferred, &result); in AddAccount()
179 AppAccountAsyncContext *asyncContext = reinterpret_cast<AppAccountAsyncContext *>(data); in AddAccount() local
180asyncContext->errCode = AppAccountManager::AddAccount(asyncContext->name, asyncContext->extraInfo); in AddAccount()
183 AppAccountAsyncContext *asyncContext = reinterpret_cast<AppAccountAsyncContext *>(data); in AddAccount() local
184 ProcessCallbackOrPromise(env, asyncContext, in AddAccount()
185 … GetErrorCodeValue(env, ConvertToJSErrCodeV8(asyncContext->errCode)), NapiGetNull(env)); in AddAccount()
186 delete asyncContext; in AddAccount()
[all …]
Dnapi_account_capability_scheduler.cpp418 …ExecuteRequestAsyncContext *asyncContext = reinterpret_cast<ExecuteRequestAsyncContext *>(work->da… in ExecuteRequestCompletedWork() local
421 if (asyncContext->businessError.code == ERR_OK) { in ExecuteRequestCompletedWork()
422 dataJs = AppExecFwk::WrapWantParams(asyncContext->env, asyncContext->parameters); in ExecuteRequestCompletedWork()
424 napi_get_reference_value(asyncContext->env, asyncContext->requestRef, &requestRef); in ExecuteRequestCompletedWork()
431 asyncContext->env, dataJs, sizeof(descriptors) / sizeof(descriptors[0]), descriptors); in ExecuteRequestCompletedWork()
437 napi_get_reference_value(asyncContext->env, g_responsConstructor, &constructor); in ExecuteRequestCompletedWork()
440 … if (napi_new_instance(asyncContext->env, constructor, 1, argv, &responseInstance) != napi_ok) { in ExecuteRequestCompletedWork()
443 napi_get_prototype(asyncContext->env, responseInstance, &g_responsePrototype); in ExecuteRequestCompletedWork()
445 … statusRet = napi_set_named_property(asyncContext->env, dataJs, "__proto__", g_responsePrototype); in ExecuteRequestCompletedWork()
450 errJs = CreateNapiErrData(asyncContext->env, asyncContext->businessError); in ExecuteRequestCompletedWork()
[all …]
/base/security/dlp_permission_service/interfaces/kits/dlp_permission/napi/src/
Dnapi_dlp_permission.cpp82 auto* asyncContext = new (std::nothrow) GenerateDlpFileAsyncContext(env); in GenerateDlpFile() local
83 if (asyncContext == nullptr) { in GenerateDlpFile()
87 std::unique_ptr<GenerateDlpFileAsyncContext> asyncContextPtr { asyncContext }; in GenerateDlpFile()
89 if (!GetGenerateDlpFileParams(env, cbInfo, *asyncContext)) { in GenerateDlpFile()
94 if (asyncContext->callbackRef == nullptr) { in GenerateDlpFile()
96 NAPI_CALL(env, napi_create_promise(env, &asyncContext->deferred, &result)); in GenerateDlpFile()
105 static_cast<void*>(asyncContext), &(asyncContext->work))); in GenerateDlpFile()
106 … NAPI_CALL(env, napi_queue_async_work_with_qos(env, asyncContext->work, napi_qos_user_initiated)); in GenerateDlpFile()
114 auto asyncContext = reinterpret_cast<GenerateDlpFileAsyncContext*>(data); in GenerateDlpFileExcute() local
115 if (asyncContext == nullptr) { in GenerateDlpFileExcute()
[all …]
/base/telephony/call_manager/frameworks/js/napi/src/
Dnapi_call_manager.cpp1020 auto asyncContext = (std::make_unique<DialAsyncContext>()); in Dial() local
1021 if (asyncContext == nullptr) { in Dial()
1028 …env, argv[ARRAY_INDEX_FIRST], asyncContext->number, PHONE_NUMBER_MAXIMUM_LIMIT, &(asyncContext->nu… in Dial()
1034 …napi_create_reference(env, argv[ARRAY_INDEX_SECOND], DATA_LENGTH_ONE, &(asyncContext->callbackRef)… in Dial()
1036 GetDialInfo(env, argv[ARRAY_INDEX_SECOND], *asyncContext); in Dial()
1040 GetDialInfo(env, argv[ARRAY_INDEX_SECOND], *asyncContext); in Dial()
1041 …napi_create_reference(env, argv[ARRAY_INDEX_THIRD], DATA_LENGTH_ONE, &(asyncContext->callbackRef)); in Dial()
1043 return HandleAsyncWork(env, asyncContext.release(), "Dial", NativeDial, NativeDialCallBack); in Dial()
1073 auto asyncContext = (std::make_unique<DialAsyncContext>()); in DialCall() local
1074 if (asyncContext == nullptr) { in DialCall()
[all …]
/base/telephony/cellular_data/frameworks/js/napi/src/
Dnapi_cellular_data.cpp124 auto asyncContext = static_cast<AsyncContext *>(data); in NativeGetCellularDataState() local
125 if (asyncContext == nullptr) { in NativeGetCellularDataState()
130 asyncContext->resolved = true; in NativeGetCellularDataState()
131 asyncContext->result = WrapCellularDataType(dataState); in NativeGetCellularDataState()
133 asyncContext->resolved = false; in NativeGetCellularDataState()
134 asyncContext->errorCode = ERROR_SERVICE_UNAVAILABLE; in NativeGetCellularDataState()
144 std::unique_ptr<AsyncContext> asyncContext(context); in GetCellularDataStateCallback() local
146 if (asyncContext->resolved) { in GetCellularDataStateCallback()
147 NAPI_CALL_RETURN_VOID(env, napi_create_int32(env, asyncContext->result, &callbackValue)); in GetCellularDataStateCallback()
149 if (asyncContext->errorCode == ERROR_SERVICE_UNAVAILABLE) { in GetCellularDataStateCallback()
[all …]
/base/startup/init/interfaces/kits/jskits/src/
Dnative_parameters_js.cpp40 static void SetCallbackWork(napi_env env, StorageAsyncContextPtr asyncContext) in SetCallbackWork() argument
47 StorageAsyncContext *asyncContext = reinterpret_cast<StorageAsyncContext *>(data); in SetCallbackWork() local
48 asyncContext->status = SetParameter(asyncContext->key, asyncContext->value); in SetCallbackWork()
50 asyncContext->status, asyncContext->key, asyncContext->value); in SetCallbackWork()
53 StorageAsyncContext *asyncContext = reinterpret_cast<StorageAsyncContext *>(data); in SetCallbackWork() local
55 if (asyncContext->status == 0) { in SetCallbackWork()
61 napi_create_int32(env, asyncContext->status, &value); in SetCallbackWork()
66 if (asyncContext->deferred) { in SetCallbackWork()
67 if (asyncContext->status == 0) { in SetCallbackWork()
68 napi_resolve_deferred(env, asyncContext->deferred, result[1]); in SetCallbackWork()
[all …]
Dnative_parameters_watch.cpp99 static void WaitCallbackWork(napi_env env, ParamAsyncContextPtr asyncContext) in WaitCallbackWork() argument
106 ParamAsyncContext *asyncContext = reinterpret_cast<ParamAsyncContext *>(data); in WaitCallbackWork() local
107asyncContext->status = WaitParameter(asyncContext->key, asyncContext->value, asyncContext->timeout… in WaitCallbackWork()
108 … PARAM_JS_LOGV("JSApp Wait status: %d, key: %s", asyncContext->status, asyncContext->key); in WaitCallbackWork()
111 ParamAsyncContext *asyncContext = reinterpret_cast<ParamAsyncContext *>(data); in WaitCallbackWork() local
115 napi_create_int32(env, asyncContext->status, &message); in WaitCallbackWork()
119 … PARAM_JS_LOGV("JSApp Wait status: %d, key: %s ", asyncContext->status, asyncContext->key); in WaitCallbackWork()
120 if (asyncContext->deferred) { in WaitCallbackWork()
121 if (asyncContext->status == 0) { in WaitCallbackWork()
122 napi_resolve_deferred(env, asyncContext->deferred, result[1]); in WaitCallbackWork()
[all …]
/base/account/os_account/interfaces/kits/napi/distributedaccount/src/
Dnapi_distributed_account.cpp77 napi_env env, napi_callback_info cbInfo, DistributedAccountAsyncContext *asyncContext) in ParseQueryOhosAccountInfoAsyncContext() argument
86 if (!GetIntProperty(env, argv[PARAM_ZERO], asyncContext->localId)) { in ParseQueryOhosAccountInfoAsyncContext()
90 asyncContext->withLocalId = true; in ParseQueryOhosAccountInfoAsyncContext()
93 if (!GetCallbackProperty(env, argv[PARAM_ZERO], asyncContext->callbackRef, PARAM_ONE)) { in ParseQueryOhosAccountInfoAsyncContext()
99 … if ((!GetCallbackProperty(env, argv[PARAM_TWO - 1], asyncContext->callbackRef, PARAM_ONE))) { in ParseQueryOhosAccountInfoAsyncContext()
103 if (!GetIntProperty(env, argv[PARAM_ZERO], asyncContext->localId)) { in ParseQueryOhosAccountInfoAsyncContext()
107 asyncContext->withLocalId = true; in ParseQueryOhosAccountInfoAsyncContext()
113 bool GetAccountInfo(napi_env env, napi_value object, DistributedAccountAsyncContext *asyncContext) in GetAccountInfo() argument
115 …if (!GetStringPropertyByKey(env, object, PROPERTY_KEY_NAME, asyncContext->ohosAccountInfo.name_)) { in GetAccountInfo()
118 AccountNapiThrow(env, ERR_JS_PARAMETER_ERROR, errMsg, asyncContext->throwErr); in GetAccountInfo()
[all …]
/base/hiviewdfx/hiappevent/frameworks/js/napi/src/
Dnapi_hiappevent_write.cpp57 void Write(const napi_env env, HiAppEventAsyncContext* asyncContext) in Write() argument
62 HiAppEventAsyncContext* asyncContext = (HiAppEventAsyncContext*)data; in Write() local
63 if (asyncContext->appEventPack != nullptr && asyncContext->result >= 0) { in Write()
64 WriteEvent(asyncContext->appEventPack); in Write()
68 HiAppEventAsyncContext* asyncContext = (HiAppEventAsyncContext*)data; in Write() local
70 if (asyncContext->result == 0) { in Write()
72 results[VALUE_INDEX] = NapiUtil::CreateInt32(env, asyncContext->result); in Write()
74 if (asyncContext->isV9) { in Write()
75 results[ERR_INDEX] = BuildErrorByResult(env, asyncContext->result); in Write()
78 NapiUtil::CreateInt32(env, asyncContext->result)); in Write()
[all …]
Dnapi_hiappevent_js.cpp38 auto asyncContext = new(std::nothrow) NapiHiAppEventWrite::HiAppEventAsyncContext(env); in Write() local
39 if (asyncContext == nullptr) { in Write()
46 asyncContext->appEventPack = builder.Build(env, params, paramNum); in Write()
47 asyncContext->result = builder.GetResult(); in Write()
48 asyncContext->callback = builder.GetCallback(); in Write()
51 if (asyncContext->result == 0) { in Write()
52 asyncContext->result = VerifyAppEvent(asyncContext->appEventPack); in Write()
57 if (asyncContext->callback == nullptr) { in Write()
58 napi_create_promise(env, &asyncContext->deferred, &promise); in Write()
62 NapiHiAppEventWrite::Write(env, asyncContext); in Write()
Dnapi_hiappevent_js_v9.cpp46 auto asyncContext = new(std::nothrow) NapiHiAppEventWrite::HiAppEventAsyncContext(env); in Write() local
47 if (asyncContext == nullptr) { in Write()
51 asyncContext->appEventPack = appEventPack; in Write()
52 asyncContext->result = builder.GetResult(); in Write()
53 asyncContext->callback = builder.GetCallback(); in Write()
54 asyncContext->isV9 = true; in Write()
56 if (asyncContext->result == 0) { in Write()
57 asyncContext->result = VerifyAppEvent(asyncContext->appEventPack); in Write()
61 if (asyncContext->callback == nullptr) { in Write()
62 napi_create_promise(env, &asyncContext->deferred, &promise); in Write()
[all …]
/base/startup/init/interfaces/kits/jskits/src_enhance/
Dnative_parameters_js.cpp102 static void SetCallbackWork(napi_env env, StorageAsyncContextPtr asyncContext) in SetCallbackWork() argument
109 StorageAsyncContext *asyncContext = reinterpret_cast<StorageAsyncContext *>(data); in SetCallbackWork() local
110 asyncContext->status = SetParameter(asyncContext->key, asyncContext->value); in SetCallbackWork()
112 asyncContext->status, asyncContext->key, asyncContext->value); in SetCallbackWork()
115 StorageAsyncContext *asyncContext = reinterpret_cast<StorageAsyncContext *>(data); in SetCallbackWork() local
117 if (asyncContext->status == 0) { in SetCallbackWork()
121 result[0] = BusinessErrorCreate(env, asyncContext->status); in SetCallbackWork()
125 if (asyncContext->deferred) { in SetCallbackWork()
126 if (asyncContext->status == 0) { in SetCallbackWork()
127 napi_resolve_deferred(env, asyncContext->deferred, result[1]); in SetCallbackWork()
[all …]
/base/telephony/state_registry/frameworks/js/napi/src/
Dnapi_state_registry.cpp73 ObserverContext *asyncContext = static_cast<ObserverContext *>(data); in NativeOn() local
74 if (!IsValidSlotId(asyncContext->slotId)) { in NativeOn()
76 asyncContext->errorCode = ERROR_SLOT_ID_INVALID; in NativeOn()
79 TELEPHONY_LOGI("NativeOn eventType = %{public}d", asyncContext->eventType); in NativeOn()
83 asyncContext->eventType, in NativeOn()
84 asyncContext->slotId, in NativeOn()
85 asyncContext->callbackRef, in NativeOn()
88 asyncContext->errorCode = EventListenerManager::RegisterEventListener(listener); in NativeOn()
89 if (asyncContext->errorCode == TELEPHONY_SUCCESS) { in NativeOn()
90 asyncContext->resolved = true; in NativeOn()
[all …]
/base/security/access_token/interfaces/kits/accesstoken/napi/src/
Dnapi_atmanager.cpp368 AtManagerAsyncContext& asyncContext) in ParseInputVerifyPermissionOrGetFlag() argument
382 asyncContext.env = env; in ParseInputVerifyPermissionOrGetFlag()
384 if (!ParseUint32(env, argv[0], asyncContext.tokenId)) { in ParseInputVerifyPermissionOrGetFlag()
392 if (!ParseString(env, argv[1], asyncContext.permissionName)) { in ParseInputVerifyPermissionOrGetFlag()
399 …ACCESSTOKEN_LOG_DEBUG(LABEL, "tokenID = %{public}d, permissionName = %{public}s", asyncContext.tok… in ParseInputVerifyPermissionOrGetFlag()
400 asyncContext.permissionName.c_str()); in ParseInputVerifyPermissionOrGetFlag()
406 AtManagerAsyncContext* asyncContext = reinterpret_cast<AtManagerAsyncContext *>(data); in VerifyAccessTokenExecute() local
407 if (asyncContext == nullptr) { in VerifyAccessTokenExecute()
410asyncContext->result = AccessTokenKit::VerifyAccessToken(asyncContext->tokenId, asyncContext->perm… in VerifyAccessTokenExecute()
415 AtManagerAsyncContext* asyncContext = reinterpret_cast<AtManagerAsyncContext *>(data); in VerifyAccessTokenComplete() local
[all …]
/base/telephony/core_service/frameworks/js/network_search/src/
Dnapi_radio.cpp129 auto asyncContext = static_cast<RadioTechContext *>(data); in NativeGetRadioTech() local
130 if (!IsValidSlotId(asyncContext->slotId)) { in NativeGetRadioTech()
132 asyncContext->errorCode = ERROR_SLOT_ID_INVALID; in NativeGetRadioTech()
138 …DelayedRefSingleton<CoreServiceClient>::GetInstance().GetPsRadioTech(asyncContext->slotId, psRadio… in NativeGetRadioTech()
140 …DelayedRefSingleton<CoreServiceClient>::GetInstance().GetCsRadioTech(asyncContext->slotId, csRadio… in NativeGetRadioTech()
142 asyncContext->resolved = true; in NativeGetRadioTech()
143 asyncContext->csTech = WrapRadioTech(csRadioTech); in NativeGetRadioTech()
144 asyncContext->psTech = WrapRadioTech(psRadioTech); in NativeGetRadioTech()
146 asyncContext->errorCode = csResult; in NativeGetRadioTech()
151 auto asyncContext = static_cast<RadioTechContext *>(data); in GetRadioTechCallback() local
[all …]
/base/telephony/core_service/frameworks/js/sim/src/
Dnapi_sim.cpp64 std::unique_ptr<AsyncContext<T>> asyncContext = std::make_unique<AsyncContext<T>>(); in NapiCreateAsyncWork() local
65 BaseContext &context = asyncContext->context; in NapiCreateAsyncWork()
66 auto inParaTp = std::make_tuple(&asyncContext->slotId, &context.callbackRef); in NapiCreateAsyncWork()
83 AsyncContext<T> *pContext = asyncContext.release(); in NapiCreateAsyncWork()
95 napi_value NapiCreateAsyncWork2(const AsyncPara &para, AsyncContextType *asyncContext, std::tuple<T… in NapiCreateAsyncWork2() argument
98 BaseContext &context = asyncContext->asyncContext.context; in NapiCreateAsyncWork2()
121 static_cast<void *>(asyncContext), &context.work)); in NapiCreateAsyncWork2()
126 …id NapiAsyncCompleteCallback(napi_env env, napi_status status, const AsyncContext<T> &asyncContext, in NapiAsyncCompleteCallback() argument
134 const BaseContext &context = asyncContext.context; in NapiAsyncCompleteCallback()
141 …uncIgnoreReturnVal ? NapiUtil::CreateUndefined(env) : GetNapiValue(env, asyncContext.callbackVal)); in NapiAsyncCompleteCallback()
[all …]
/base/location/frameworks/js/napi/source/
Dlocation_napi_adapter.cpp39 auto asyncContext = new (std::nothrow) LocationAsyncContext(env); in GetLastLocation() local
40 NAPI_ASSERT(env, asyncContext != nullptr, "asyncContext is null."); in GetLastLocation()
41 … napi_create_string_latin1(env, "getLastLocation", NAPI_AUTO_LENGTH, &asyncContext->resourceName)); in GetLastLocation()
42 asyncContext->executeFunc = [&](void* data) -> void { in GetLastLocation()
52 asyncContext->completeFunc = [&](void* data) -> void { in GetLastLocation()
64 return DoAsyncWork(env, asyncContext, argc, argv, objectArgsNum); in GetLastLocation()
110 auto asyncContext = new (std::nothrow) SwitchAsyncContext(env); in IsLocationEnabled() local
111 NAPI_ASSERT(env, asyncContext != nullptr, "asyncContext is null."); in IsLocationEnabled()
112 …napi_create_string_latin1(env, "isLocationEnabled", NAPI_AUTO_LENGTH, &asyncContext->resourceName); in IsLocationEnabled()
113 asyncContext->executeFunc = [&](void* data) -> void { in IsLocationEnabled()
[all …]
/base/security/access_token/interfaces/kits/privacy/napi/src/
Dpermission_record_manager_napi.cpp121 const napi_env env, const napi_callback_info info, RecordManagerAsyncContext& asyncContext) in ParseAddPermissionRecord() argument
135 asyncContext.env = env; in ParseAddPermissionRecord()
137 if (!ParseUint32(env, argv[0], asyncContext.tokenId)) { in ParseAddPermissionRecord()
143 if (!ParseString(env, argv[1], asyncContext.permissionName)) { in ParseAddPermissionRecord()
149 if (!ParseInt32(env, argv[2], asyncContext.successCount)) { in ParseAddPermissionRecord()
155 if (!ParseInt32(env, argv[3], asyncContext.failCount)) { in ParseAddPermissionRecord()
161 … if (!IsUndefinedOrNull(env, argv[4]) && !ParseCallback(env, argv[4], asyncContext.callbackRef)) { in ParseAddPermissionRecord()
170 const napi_env env, const napi_callback_info info, RecordManagerAsyncContext& asyncContext) in ParseStartAndStopUsingPermission() argument
184 asyncContext.env = env; in ParseStartAndStopUsingPermission()
186 if (!ParseUint32(env, argv[0], asyncContext.tokenId)) { in ParseStartAndStopUsingPermission()
[all …]
/base/security/huks/frameworks/crypto_lite/js/napi/
Dcipher_napi.cpp310 static int32_t AesExcute(AesAsyncContext *asyncContext) in AesExcute() argument
314 iv.ivBuf = asyncContext->ivBuf; in AesExcute()
315 iv.ivLen = asyncContext->ivLen; in AesExcute()
316 iv.ivOffset = asyncContext->ivOffset; in AesExcute()
317 iv.transformation = asyncContext->transformation; in AesExcute()
319 …int ret = InitAesCryptData(asyncContext->action, asyncContext->textIn, asyncContext->key, &iv, &ae… in AesExcute()
329 asyncContext->textOut = static_cast<char *>(malloc(strlen(aes.data.text) + 1)); in AesExcute()
330 if (asyncContext->textOut == nullptr) { in AesExcute()
334 (void)memset_s(asyncContext->textOut, strlen(aes.data.text) + 1, 0, strlen(aes.data.text) + 1); in AesExcute()
335 …(void)memcpy_s(asyncContext->textOut, strlen(aes.data.text) + 1, aes.data.text, strlen(aes.data.te… in AesExcute()
[all …]
/base/telephony/core_service/frameworks/js/sim/include/
Dnapi_sim.h40 AsyncContext<bool> asyncContext; member
45 AsyncContext<napi_value> asyncContext; member
54 AsyncContext<napi_value> asyncContext; member
64 AsyncContext<napi_value> asyncContext; member
77 AsyncContext<T> asyncContext; member
83 AsyncContext<bool> asyncContext; member
89 AsyncContext<int32_t> asyncContext; member
94 AsyncContext<int32_t> asyncContext; member
98 AsyncContext<int32_t> asyncContext; member
102 AsyncContext<int32_t> asyncContext; member
/base/account/os_account/interfaces/kits/napi/osaccount/include/
Dnapi_os_account_common.h54 …eParaQueryOAByIdCB(napi_env env, napi_callback_info cbInfo, QueryOAByIdAsyncContext *asyncContext);
64 …l ParseParaRemoveOACB(napi_env env, napi_callback_info cbInfo, RemoveOAAsyncContext *asyncContext);
70 …l ParseParaSetOAName(napi_env env, napi_callback_info cbInfo, SetOANameAsyncContext *asyncContext);
76 …ParaSetOAConstraints(napi_env env, napi_callback_info cbInfo, SetOAConsAsyncContext *asyncContext);
82 …l ParseParaActiveOA(napi_env env, napi_callback_info cbInfo, ActivateOAAsyncContext *asyncContext);
88 bool ParseParaCreateOA(napi_env env, napi_callback_info cbInfo, CreateOAAsyncContext *asyncContext);
91 CreateOAForDomainAsyncContext *asyncContext);
103 …ParseParaGetOACount(napi_env env, napi_callback_info cbInfo, GetOACountAsyncContext *asyncContext);
109 …ParseParaDbDeviceId(napi_env env, napi_callback_info cbInfo, DbDeviceIdAsyncContext *asyncContext);
115 …ParseParaGetAllCons(napi_env env, napi_callback_info cbInfo, GetAllConsAsyncContext *asyncContext);
[all …]
/base/usb/usb_manager/interfaces/kits/js/napi/src/
Dusb_info.cpp70 static void ProcessPromise(const napi_env env, const USBAsyncContext &asyncContext, napi_value &res… in ProcessPromise() argument
72 if (asyncContext.deferred) { in ProcessPromise()
73 if (asyncContext.status == napi_ok) { in ProcessPromise()
74 napi_resolve_deferred(env, asyncContext.deferred, result); in ProcessPromise()
76 napi_reject_deferred(env, asyncContext.deferred, result); in ProcessPromise()
524 USBRightAsyncContext *asyncContext = reinterpret_cast<USBRightAsyncContext *>(data); in __anonfdf92cdc0102() local
525 int32_t ret = g_usbClient.RequestRight(asyncContext->deviceName); in __anonfdf92cdc0102()
527 asyncContext->status = napi_ok; in __anonfdf92cdc0102()
529 asyncContext->status = napi_generic_failure; in __anonfdf92cdc0102()
534 USBRightAsyncContext *asyncContext = reinterpret_cast<USBRightAsyncContext *>(data); in __anonfdf92cdc0202() local
[all …]
/base/account/os_account/interfaces/kits/napi/domain_account/src/
Dnapi_domain_account_manager.cpp220 napi_env env, napi_callback_info cbInfo, UpdateAccountTokenAsyncContext *asyncContext) in ParseParamForUpdateAccountToken() argument
230 if (!GetCallbackProperty(env, argv[argc - 1], asyncContext->callbackRef, 1)) { in ParseParamForUpdateAccountToken()
235 if (!ParseDomainAccountInfo(env, argv[0], asyncContext->domainInfo)) { in ParseParamForUpdateAccountToken()
239 if (ParseUint8TypedArrayToVector(env, argv[PARAM_ONE], asyncContext->token) != napi_ok) { in ParseParamForUpdateAccountToken()
247 napi_env env, napi_callback_info cbInfo, GetAccessTokenAsyncContext *asyncContext) in ParseParamForGetAccessToken() argument
257 if (!GetCallbackProperty(env, argv[argc - 1], asyncContext->callbackRef, 1)) { in ParseParamForGetAccessToken()
262 if (!ParseDomainAccountInfo(env, argv[0], asyncContext->domainInfo)) { in ParseParamForGetAccessToken()
266 if (!AppExecFwk::UnwrapWantParams(env, argv[PARAM_ONE], asyncContext->getTokenParams)) { in ParseParamForGetAccessToken()
976 napi_env env, napi_callback_info cbInfo, HasDomainAccountAsyncContext *asyncContext) in ParseParamForHasDomainAccount() argument
986 if (!GetCallbackProperty(env, argv[argc - 1], asyncContext->callbackRef, 1)) { in ParseParamForHasDomainAccount()
[all …]

123