Home
last modified time | relevance | path

Searched refs:callbackValue (Results 1 – 20 of 20) sorted by relevance

/base/telephony/state_registry/frameworks/js/napi/src/
Devent_listener_handler.cpp578 napi_value callbackValue = nullptr; in WorkCallStateUpdated() local
579 napi_create_object(callStateInfo->env, &callbackValue); in WorkCallStateUpdated()
582 SetPropertyToNapiObject(callStateInfo->env, callbackValue, "state", wrappedCallState); in WorkCallStateUpdated()
583 SetPropertyToNapiObject(callStateInfo->env, callbackValue, "number", number); in WorkCallStateUpdated()
584 NapiReturnToJS(callStateInfo->env, callStateInfo->callbackRef, callbackValue); in WorkCallStateUpdated()
590 napi_value callbackValue = nullptr; in WorkSignalUpdated() local
592 napi_create_array(env, &callbackValue); in WorkSignalUpdated()
600 napi_set_element(env, callbackValue, i, info); in WorkSignalUpdated()
602 NapiReturnToJS(env, infoListUpdateInfo->callbackRef, callbackValue); in WorkSignalUpdated()
608 napi_value callbackValue = nullptr; in WorkNetworkStateUpdated() local
[all …]
/base/customization/enterprise_device_management/interfaces/kits/common/src/
Dnapi_edm_common.cpp189 napi_value callbackValue[ARGS_SIZE_TWO] = { 0 }; in NativeBoolCallbackComplete() local
191 napi_get_null(env, &callbackValue[ARR_INDEX_ZERO]); in NativeBoolCallbackComplete()
193 napi_get_boolean(env, asyncCallbackInfo->boolRet, &callbackValue[ARR_INDEX_ONE]); in NativeBoolCallbackComplete()
198 callbackValue[ARR_INDEX_ZERO] = CreateError(env, asyncCallbackInfo->ret); in NativeBoolCallbackComplete()
199 napi_get_null(env, &callbackValue[ARR_INDEX_ONE]); in NativeBoolCallbackComplete()
204 … napi_call_function(env, nullptr, callback, std::size(callbackValue), callbackValue, &result); in NativeBoolCallbackComplete()
229 napi_value callbackValue[ARGS_SIZE_TWO] = { 0 }; in NativeStringCallbackComplete() local
231 napi_get_null(env, &callbackValue[ARR_INDEX_ZERO]); in NativeStringCallbackComplete()
234 &callbackValue[ARR_INDEX_ONE]); in NativeStringCallbackComplete()
239 callbackValue[ARR_INDEX_ZERO] = CreateError(env, asyncCallbackInfo->ret); in NativeStringCallbackComplete()
[all …]
/base/telephony/cellular_data/frameworks/js/napi/src/
Dnapi_cellular_data.cpp145 napi_value callbackValue = nullptr; in GetCellularDataStateCallback() local
147 NAPI_CALL_RETURN_VOID(env, napi_create_int32(env, asyncContext->result, &callbackValue)); in GetCellularDataStateCallback()
150 callbackValue = in GetCellularDataStateCallback()
153 callbackValue = NapiUtil::CreateErrorMessage(env, "unkonwn error"); in GetCellularDataStateCallback()
156 NapiUtil::Handle2ValueCallback(env, asyncContext.release(), callbackValue); in GetCellularDataStateCallback()
208 napi_value callbackValue = nullptr; in IsCellularDataEnabledCallback() local
211 …yncContext->result == static_cast<int32_t>(DataSwitchCode::CELLULAR_DATA_ENABLED), &callbackValue); in IsCellularDataEnabledCallback()
216 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in IsCellularDataEnabledCallback()
218 NapiUtil::Handle2ValueCallback(env, asyncContext.release(), callbackValue); in IsCellularDataEnabledCallback()
275 napi_value callbackValue = nullptr; in EnableCellularDataCallback() local
[all …]
/base/telephony/sms_mms/frameworks/js/napi/src/
Dnapi_sms.cpp374 napi_value callbackValue = nullptr; in CreateMessageCallback() local
377 callbackValue = CreateShortMessageValue(env, *(asyncContext->shortMessage)); in CreateMessageCallback()
384 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in CreateMessageCallback()
387 callbackValue = NapiUtil::CreateErrorMessage( in CreateMessageCallback()
390 NapiUtil::Handle2ValueCallback(env, asyncContext, callbackValue); in CreateMessageCallback()
487 napi_value callbackValue = nullptr; in SetDefaultSmsSlotIdCallback() local
489 napi_get_undefined(env, &callbackValue); in SetDefaultSmsSlotIdCallback()
493 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in SetDefaultSmsSlotIdCallback()
495 NapiUtil::Handle1ValueCallback(env, context, callbackValue); in SetDefaultSmsSlotIdCallback()
565 napi_value callbackValue = nullptr; in GetDefaultSmsSlotIdCallback() local
[all …]
Dnapi_mms.cpp585 napi_value callbackValue = nullptr; in DecodeMmsCallback() local
589 callbackValue = CreateDecodeMmsValue(env, *decodeMmsContext); in DecodeMmsCallback()
592 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in DecodeMmsCallback()
595 callbackValue = in DecodeMmsCallback()
598 NapiUtil::Handle2ValueCallback(env, decodeMmsContext, callbackValue); in DecodeMmsCallback()
1343 napi_value callbackValue = nullptr; in EncodeMmsCallback() local
1345 napi_create_array(env, &callbackValue); in EncodeMmsCallback()
1350 napi_set_element(env, callbackValue, i, itemValue); in EncodeMmsCallback()
1354 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in EncodeMmsCallback()
1356 NapiUtil::Handle2ValueCallback(env, context, callbackValue); in EncodeMmsCallback()
/base/telephony/core_service/frameworks/js/network_search/src/
Dnapi_radio.cpp141 napi_value callbackValue = nullptr; in GetRadioTechCallback() local
143 napi_create_object(env, &callbackValue); in GetRadioTechCallback()
144 NapiUtil::SetPropertyInt32(env, callbackValue, "psRadioTech", asyncContext->psTech); in GetRadioTechCallback()
145 NapiUtil::SetPropertyInt32(env, callbackValue, "csRadioTech", asyncContext->csTech); in GetRadioTechCallback()
149 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in GetRadioTechCallback()
151 NapiUtil::Handle2ValueCallback(env, asyncContext, callbackValue); in GetRadioTechCallback()
217 napi_value callbackValue = nullptr; in GetSignalInfoListCallback() local
219 napi_create_array(env, &callbackValue); in GetSignalInfoListCallback()
235 napi_set_element(env, callbackValue, i, info); in GetSignalInfoListCallback()
243 callbackValue = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in GetSignalInfoListCallback()
[all …]
/base/telephony/call_manager/frameworks/js/napi/src/
Dnapi_call_manager.cpp2344 napi_value callbackValue[ARRAY_INDEX_THIRD] = { 0 }; in NativeCallBack() local
2346 callbackValue[ARRAY_INDEX_FIRST] = NapiCallManagerUtils::CreateUndefined(env); in NativeCallBack()
2347 napi_create_int32(env, asyncContext->resolved, &callbackValue[ARRAY_INDEX_SECOND]); in NativeCallBack()
2349 callbackValue[ARRAY_INDEX_FIRST] = NapiCallManagerUtils::CreateErrorCodeAndMessageForJs( in NativeCallBack()
2351 callbackValue[ARRAY_INDEX_SECOND] = NapiCallManagerUtils::CreateUndefined(env); in NativeCallBack()
2356 … napi_call_function(env, nullptr, callback, std::size(callbackValue), callbackValue, &result); in NativeCallBack()
2383 napi_value callbackValue[ARRAY_INDEX_THIRD] = { 0 }; in NativeDialCallBack() local
2385 callbackValue[ARRAY_INDEX_FIRST] = NapiCallManagerUtils::CreateUndefined(env); in NativeDialCallBack()
2386 napi_get_boolean(env, true, &callbackValue[ARRAY_INDEX_SECOND]); in NativeDialCallBack()
2388 callbackValue[ARRAY_INDEX_FIRST] = NapiCallManagerUtils::CreateErrorCodeAndMessageForJs( in NativeDialCallBack()
[all …]
Dnapi_call_ability_callback.cpp926 napi_value callbackValue = nullptr; in ReportSupplementInfo() local
927 napi_create_object(env, &callbackValue); in ReportSupplementInfo()
928 …NapiCallManagerUtils::SetPropertyInt32(env, callbackValue, "status", resultInfo.GetIntValue("statu… in ReportSupplementInfo()
929 …NapiCallManagerUtils::SetPropertyStringUtf8(env, callbackValue, "number", resultInfo.GetStringValu… in ReportSupplementInfo()
935 callbackValues[ARRAY_INDEX_SECOND] = callbackValue; in ReportSupplementInfo()
951 napi_resolve_deferred(env, supplementInfo.deferred, callbackValue); in ReportSupplementInfo()
977 napi_value callbackValue = nullptr; in ReportExecutionResult() local
978 napi_create_object(env, &callbackValue); in ReportExecutionResult()
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/js/napi/
Dnapi_faultlogger.cpp107 napi_value callbackValue = nullptr; in FaultLogCompleteCallback() local
109 napi_create_array(env, &callbackValue); in FaultLogCompleteCallback()
122 napi_set_element(env, callbackValue, i, info); in FaultLogCompleteCallback()
128 callbackValue = NapiUtil::CreateErrorMessage(env, "get signal info list failed"); in FaultLogCompleteCallback()
135 …callbackValues[0] = faultLogInfoContext->resolved ? NapiUtil::CreateUndefined(env) : callbackValue; in FaultLogCompleteCallback()
136 …callbackValues[1] = faultLogInfoContext->resolved ? callbackValue : NapiUtil::CreateUndefined(env); in FaultLogCompleteCallback()
143 napi_resolve_deferred(env, faultLogInfoContext->deferred, callbackValue); in FaultLogCompleteCallback()
145 napi_reject_deferred(env, faultLogInfoContext->deferred, callbackValue); in FaultLogCompleteCallback()
/base/telephony/core_service/frameworks/js/napi/
Dnapi_util.cpp286 …id NapiUtil::Handle1ValueCallback(napi_env env, BaseContext *baseContext, napi_value callbackValue) in Handle1ValueCallback() argument
299 napi_value callbackValues[] = {callbackValue}; in Handle1ValueCallback()
308 … NAPI_CALL_RETURN_VOID(env, napi_resolve_deferred(env, baseContext->deferred, callbackValue)); in Handle1ValueCallback()
311 … NAPI_CALL_RETURN_VOID(env, napi_reject_deferred(env, baseContext->deferred, callbackValue)); in Handle1ValueCallback()
322 …id NapiUtil::Handle2ValueCallback(napi_env env, BaseContext *baseContext, napi_value callbackValue) in Handle2ValueCallback() argument
336 callbackValues[0] = baseContext->resolved ? CreateUndefined(env) : callbackValue; in Handle2ValueCallback()
337 callbackValues[1] = baseContext->resolved ? callbackValue : CreateUndefined(env); in Handle2ValueCallback()
346 … NAPI_CALL_RETURN_VOID(env, napi_resolve_deferred(env, baseContext->deferred, callbackValue)); in Handle2ValueCallback()
348 … NAPI_CALL_RETURN_VOID(env, napi_reject_deferred(env, baseContext->deferred, callbackValue)); in Handle2ValueCallback()
Dnapi_util.h56 static void Handle1ValueCallback(napi_env env, BaseContext *context, napi_value callbackValue);
57 static void Handle2ValueCallback(napi_env env, BaseContext *context, napi_value callbackValue);
/base/useriam/user_auth_framework/frameworks/js/napi/user_auth/src/
Dauth_instance_v9.cpp172 napi_value callbackValue; in GetCallback() local
173 ret = napi_get_named_property(env, value, "callback", &callbackValue); in GetCallback()
178 return Common::MakeShared<JsRefHolder>(env, callbackValue); in GetCallback()
/base/security/crypto_framework/frameworks/js/napi/certificate/src/
Dnapi_x509_crl_entry.cpp109 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
113 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, true)) { in CreateCallbackAndPromise()
Dnapi_x509_crl.cpp130 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
134 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, true)) { in CreateCallbackAndPromise()
Dnapi_x509_certificate.cpp122 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
126 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, true)) { in CreateCallbackAndPromise()
/base/security/crypto_framework/frameworks/js/napi/crypto/src/
Dnapi_rand.cpp108 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
112 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, false)) { in CreateCallbackAndPromise()
Dnapi_md.cpp107 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
111 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, false)) { in CreateCallbackAndPromise()
Dnapi_mac.cpp110 size_t maxCount, napi_value callbackValue) in CreateCallbackAndPromise() argument
114 if (!GetCallbackFromJSParams(env, callbackValue, &context->callback, false)) { in CreateCallbackAndPromise()
/base/telephony/core_service/frameworks/js/network_search/include/
Dnapi_radio.h243 napi_value callbackValue = nullptr; member
/base/telephony/core_service/frameworks/js/sim/src/
Dnapi_sim.cpp144 napi_value callbackValue[] {NapiUtil::CreateUndefined(env), res}; in NapiAsyncCompleteCallback() local
146 callbackValue[0] = NapiUtil::CreateErrorMessage(env, errMessage, errorCode); in NapiAsyncCompleteCallback()
147 callbackValue[1] = NapiUtil::CreateUndefined(env); in NapiAsyncCompleteCallback()
155 …env, napi_call_function(env, undefined, callback, std::size(callbackValue), callbackValue, &result… in NapiAsyncCompleteCallback()
183 napi_value callbackValue[] { NapiUtil::CreateUndefined(env), res }; in NapiAsyncBaseCompleteCallback() local
185 callbackValue[0] = NapiUtil::CreateErrorMessage(env, error.errorMessage, error.errorCode); in NapiAsyncBaseCompleteCallback()
186 callbackValue[1] = NapiUtil::CreateUndefined(env); in NapiAsyncBaseCompleteCallback()
194 …env, napi_call_function(env, undefined, callback, std::size(callbackValue), callbackValue, &result… in NapiAsyncBaseCompleteCallback()