Home
last modified time | relevance | path

Searched refs:JSI (Results 1 – 25 of 54) sorted by relevance

123

/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/native_engine/jsi/test/unittest/common/
H A Djsi_interface_tdd_test.cpp51 return JSI::CreateUndefined(); in Function()
62 return JSI::CreateUndefined(); in Setter()
102 JSI::ReleaseValue(object); in JSIInterfaceTest001()
122 JSI::ReleaseValue(global); in JSIInterfaceTest002()
464 JSI::ReleaseValue(acquire); in JSIInterfaceTest012()
521 JSI::ReleaseValue(obj); in JSIInterfaceTest014()
547 JSI::ReleaseValue(obj); in JSIInterfaceTest015()
573 JSI::ReleaseValue(obj); in JSIInterfaceTest016()
574 JSI::ReleaseString(str); in JSIInterfaceTest016()
609 JSI::ReleaseString(str); in JSIInterfaceTest017()
[all …]
/ohos5.0/commonlibrary/utils_lite/js/builtin/deviceinfokit/src/
H A Dnativeapi_ohos_deviceinfo.cpp34 JSIValue deviceType = JSI::CreateString(value); in JSGetDeviceType()
56 JSIValue productBrand = JSI::CreateString(value); in JSGetBrand()
67 JSIValue marketName = JSI::CreateString(value); in JSGetMarketName()
155 JSIValue abiList = JSI::CreateString(value); in JSGetAbiList()
209 JSIValue osVersion = JSI::CreateString(value); in JSGetOSFullName()
292 JSIValue versionId = JSI::CreateString(value); in JSGetVersionId()
303 JSIValue buildType = JSI::CreateString(value); in JSGetBuildType()
314 JSIValue buildUser = JSI::CreateString(value); in JSGetBuildUser()
325 JSIValue buildHost = JSI::CreateString(value); in JSGetBuildHost()
336 JSIValue buildTime = JSI::CreateString(value); in JSGetBuildTime()
[all …]
H A Dnativeapi_deviceinfo.cpp32 JSIValue undefValue = JSI::CreateUndefined(); in ExecuteAsyncWork()
40 params->thisVal = JSI::AcquireValue(thisVal); in ExecuteAsyncWork()
41 params->args = JSI::AcquireValue(args[0]); in ExecuteAsyncWork()
55 JSIValue result = JSI::CreateObject(); in ExecuteGetInfo()
61 JSI::ReleaseValueList(args, thisVal, result, ARGS_END); in ExecuteGetInfo()
102 JSI::SetStringProperty(result, "language", ""); in GetLanguage()
118 JSI::SetStringProperty(result, "brand", brand); in GetProductInfo()
120 JSI::SetStringProperty(result, "model", model); in GetProductInfo()
121 JSI::SetStringProperty(result, "product", model); in GetProductInfo()
148 JSI::SetStringProperty(result, "region", ""); in GetRegion()
[all …]
/ohos5.0/base/powermgr/battery_lite/frameworks/js/builtin/src/
H A Dbattery_module.cpp25 if (JSI::ValueIsUndefined(args)) { in SuccessCallBack()
30 if (!JSI::ValueIsUndefined(success)) { in SuccessCallBack()
37 if (!JSI::ValueIsUndefined(complete)) { in SuccessCallBack()
53 JSIValue result = JSI::CreateObject(); in GetBatterySOC()
56 JSI::ReleaseValue(result); in GetBatterySOC()
72 JSI::ReleaseValue(result); in GetChargingStatus()
88 JSI::ReleaseValue(result); in GetHealthStatus()
104 JSI::ReleaseValue(result); in GetPluggedType()
121 JSI::ReleaseValue(result); in GetVoltage()
137 JSI::ReleaseValue(result); in GetTechnology()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/
H A Dsample_module.cpp27 return JSI::CreateUndefined(); in TestCallFunc()
38 JSIValue result = JSI::CreateObject(); in TestCallback()
103 JSI::ReleaseString(str); in TestCallbackWithArgs()
143 JSI::ReleaseString(str); in TestStandardCallbackWithArgs()
159 return JSI::CreateUndefined(); in TestGeneralFunc()
164 return JSI::CreateUndefined(); in TestGeneralFunc()
167 result = JSI::CreateObject(); in TestGeneralFunc()
170 JSI::ReleaseString(param1); in TestGeneralFunc()
185 return JSI::CreateUndefined(); in Setter()
191 return JSI::CreateUndefined(); in Setter()
[all …]
H A Ddfx_module.cpp53 return JSI::ValueToString(args[0]); in GetDomViewId()
89 JSI::ReleaseValue(retVal); in Screenshot()
107 JSI::ReleaseValue(retVal); in Screenshot()
140 JSI::ReleaseValue(retVal); in DumpDomTree()
149 JSI::ReleaseString(viewId); in DumpDomTree()
163 JSI::ReleaseString(viewId); in DumpDomTree()
168 JSI::ReleaseString(viewId); in DumpDomTree()
187 JSI::ReleaseValue(retVal); in DumpDomTree()
219 JSI::ReleaseValue(retVal); in DumpDomTree()
220 return JSI::CreateBoolean(false); in DumpDomTree()
[all …]
H A Dapp_module.cpp50 JSIValue result = JSI::CreateUndefined(); in GetInfo()
62 result = JSI::CreateObject(); in GetInfo()
128 return JSI::CreateUndefined(); in Terminate()
143 visible = JSI::ValueIsBoolean(visibleInput) ? JSI::ValueToBoolean(visibleInput) : false; in ScreenOnVisible()
154 JSI::ReleaseValueList(visibleInput); in ScreenOnVisible()
161 if ((!JSI::ValueIsUndefined(callback)) && JSI::ValueIsFunction(callback)) { in OnSetActionSuccess()
164 JSI::ReleaseValue(callback); in OnSetActionSuccess()
171 if ((!JSI::ValueIsUndefined(fail)) && JSI::ValueIsFunction(fail)) { in OnSetActionFail()
177 JSI::ReleaseValue(fail); in OnSetActionFail()
184 if ((!JSI::ValueIsUndefined(callback)) && JSI::ValueIsFunction(callback)) { in OnSetActionComplete()
[all …]
/ohos5.0/base/security/huks/frameworks/crypto_lite/js/builtin/src/
H A Dcipher_module.cpp40 JSIValue result = JSI::CreateObject(); in Rsa()
83 JSI::ReleaseString(strAction); in Rsa()
84 JSI::ReleaseString(strText); in Rsa()
86 JSI::ReleaseString(strKey); in Rsa()
87 JSI::ReleaseString(strTransformation); in Rsa()
113 JSIValue result = JSI::CreateObject(); in Aes()
122 if (JSI::ValueIsNumber(jsIvLen)) { in Aes()
150 JSI::ReleaseString(strAction); in Aes()
151 JSI::ReleaseString(strText); in Aes()
154 JSI::ReleaseString(strKey); in Aes()
[all …]
/ohos5.0/foundation/communication/netstack/frameworks/js/builtin/fetch/src/
H A Dfetch_module.cpp36 JSI::ReleaseString(s); in FreeString()
45 return JSI::CreateUndefined(); in Fetch()
62 return JSI::CreateUndefined(); in Fetch()
67 if (options == nullptr || JSI::ValueIsUndefined(options) || !JSI::ValueIsObject(options)) { in JsObjectToRequestData()
85 JSI::GetNamedProperty(options, HttpConstant::KEY_HTTP_REQUEST_HEADER), JSI::ReleaseValue); in JsObjectToRequestData()
97 …std::unique_ptr<JSIVal, decltype(&JSI::ReleaseValue)> keys(JSI::GetObjectKeys(nv), JSI::ReleaseVal… in GetNameValue()
98 if (keys == nullptr || JSI::ValueIsUndefined(keys.get()) || !JSI::ValueIsArray(keys.get())) { in GetNameValue()
107 if (key == nullptr || JSI::ValueIsUndefined(key.get()) || !JSI::ValueIsString(key.get())) { in GetNameValue()
130 JSI::GetNamedProperty(options, HttpConstant::KEY_HTTP_REQUEST_DATA), JSI::ReleaseValue); in GetRequestBody()
168 JSI::GetNamedProperty(options, HttpConstant::KEY_HTTP_REQUEST_DATA), JSI::ReleaseValue); in ParseExtraData()
[all …]
H A Dhttp_async_callback.cpp65 JSIValue object = JSI::CreateObject(); in ResponseDataToJsValue()
79 …if (jsonObj != nullptr && !JSI::ValueIsUndefined(jsonObj.get()) && JSI::ValueIsObject(jsonObj.get(… in ResponseDataToJsValue()
87 …std::unique_ptr<JSIVal, decltype(&JSI::ReleaseValue)> headers(JSI::CreateObject(), JSI::ReleaseVal… in ResponseDataToJsValue()
89 JSI::ReleaseValue(object); in ResponseDataToJsValue()
90 return JSI::CreateUndefined(); in ResponseDataToJsValue()
103 if (success == nullptr || JSI::ValueIsUndefined(success) || !JSI::ValueIsFunction(success)) { in OnSuccess()
108 if (obj == nullptr || JSI::ValueIsUndefined(obj.get()) || !JSI::ValueIsObject(obj.get())) { in OnSuccess()
119 if (fail == nullptr || JSI::ValueIsUndefined(fail) || !JSI::ValueIsFunction(fail)) { in OnFail()
122 …std::unique_ptr<JSIVal, decltype(&JSI::ReleaseValue)> errInfo(JSI::CreateString(errData), JSI::Rel… in OnFail()
123 …std::unique_ptr<JSIVal, decltype(&JSI::ReleaseValue)> retCode(JSI::CreateNumber(errCode), JSI::Rel… in OnFail()
[all …]
/ohos5.0/foundation/multimedia/media_lite/interfaces/kits/player_lite/js/builtin/src/
H A Daudio_module.cpp69 if (!JSI::ValueIsObject(options)) { in GetPlayState()
96 return JSI::CreateUndefined(); in GetPlayState()
102 return (src == nullptr) ? JSI::CreateUndefined() : JSI::CreateString(src); in SrcGetter()
134 return duation == -1 ? JSI::CreateNumberNaN() : JSI::CreateNumber(static_cast<double>(duation)); in DurationGetter()
215 return JSI::CreateBoolean(true); in OnPlaySetter()
230 return JSI::CreateBoolean(true); in OnPauseSetter()
245 return JSI::CreateBoolean(true); in OnStopSetter()
260 return JSI::CreateBoolean(true); in OnLoadedDataSetter()
275 return JSI::CreateBoolean(true); in OnEndedSetter()
290 return JSI::CreateBoolean(true); in OnErrorSetter()
[all …]
/ohos5.0/base/hiviewdfx/hilog_lite/frameworks/js/builtin/src/
H A Dhilog_module.cpp179 JSI::ValueIsUndefined(args[SECOND]) || JSI::ValueIsUndefined(args[THIRD])) { in IsLoggable()
183 if (JSI::ValueIsNull(args[FIRST]) || JSI::ValueIsNull(args[SECOND]) || in IsLoggable()
188 if (!JSI::ValueIsNumber(args[FIRST]) || !JSI::ValueIsString(args[SECOND]) || in IsLoggable()
207 JSI::ReleaseString(tag); in IsLoggable()
211 JSI::ReleaseString(tag); in IsLoggable()
243 JSI::ValueIsUndefined(args[FIRST]) || JSI::ValueIsUndefined(args[SECOND]) || in HilogImpl()
244 JSI::ValueIsUndefined(args[THIRD]) || JSI::ValueIsNull(args[FIRST]) || in HilogImpl()
245 JSI::ValueIsNull(args[SECOND]) || JSI::ValueIsNull(args[THIRD])) { in HilogImpl()
263 JSI::ReleaseString(tag); in HilogImpl()
271 JSI::ReleaseString(tag); in HilogImpl()
[all …]
/ohos5.0/commonlibrary/utils_lite/js/builtin/filekit/src/
H A Dnativeapi_fs.cpp101 JSI::ReleaseString(src); in ExecuteCopyFile()
131 JSI::ReleaseString(dest); in ExecuteCopyFile()
147 JSI::ReleaseString(src); in ExecuteDeleteAccess()
216 JSI::ReleaseString(uri); in ExecuteGetFileList()
272 JSI::ReleaseString(src); in ExecuteGetFileInfo()
289 JSI::ReleaseString(src); in ExecuteWriteTextFile()
301 JSI::ReleaseString(text); in ExecuteWriteTextFile()
356 JSI::ReleaseString(src); in ExecuteReadTextFile()
376 JSI::ReleaseString(src); in ExecuteDirFunc()
452 JSI::ReleaseString(src); in ExecuteReadArrayFile()
[all …]
/ohos5.0/commonlibrary/utils_lite/js/builtin/common/src/
H A Dnativeapi_common.cpp24 if (JSI::ValueIsUndefined(args)) { in FailCallBack()
29 errInfo = JSI::CreateString(ERR_IO_EXCEPTION); in FailCallBack()
35 errInfo = JSI::CreateString(ERR_NO_FILE); in FailCallBack()
41 errInfo = JSI::CreateString(ERR_GENERAL); in FailCallBack()
44 JSIValue errCode = JSI::CreateNumber(ret); in FailCallBack()
48 if (!JSI::ValueIsUndefined(fail)) { in FailCallBack()
51 if (!JSI::ValueIsUndefined(complete)) { in FailCallBack()
59 if (JSI::ValueIsUndefined(args)) { in SuccessCallBack()
64 if (!JSI::ValueIsUndefined(success)) { in SuccessCallBack()
65 if (JSI::ValueIsUndefined(jsiValue)) { in SuccessCallBack()
[all …]
/ohos5.0/base/security/huks/interfaces/kits/liteapi/src/
H A Dhks_lite_api.cpp27 JSIValue numberProperty = JSI::CreateNumber(value); in AddInt32PropertyInLite()
33 JSIValue errorCode = JSI::CreateObject(); in CreateHuksErrCode()
63 JSIValue keyPurpose = JSI::CreateObject(); in CreateHuksKeyPurpose()
76 JSIValue keyPadding = JSI::CreateObject(); in CreateHuksKeyPadding()
91 JSIValue keyCipherMode = JSI::CreateObject(); in CreateHuksCipherMode()
103 JSIValue keySize = JSI::CreateObject(); in CreateHuksKeySize()
122 JSIValue keyAlg = JSI::CreateObject(); in CreateHuksKeyAlg()
138 JSIValue keyFlag = JSI::CreateObject(); in CreateHuksKeyFlag()
160 JSIValue tagType = JSI::CreateObject(); in CreateHuksTagType()
230 JSIValue tag = JSI::CreateObject(); in CreateHuksTag()
[all …]
H A Dhks_lite_api_common.cpp39 JSI::ReleaseValue(jsiValue); \
47 JSI::ReleaseString(jsiString); \
57 if (JSI::ValueIsNumber(valueJSIValue)) { in CheckIsNumberAndAssignIntParam()
72 if (JSI::ValueIsNumber(valueJSIValue)) { in CheckIsNumberAndAssignUintParam()
87 if (JSI::ValueIsNumber(valueJSIValue)) { in CheckIsNumberAndAssignUlongParam()
114 if (!JSI::ValueIsTypedArray(value)) { in ParseUint8ArrayToHksBlob()
374 JSIValue res = JSI::CreateObject(); in HksConvertErrorCodeToError()
385 return JSI::CreateBoolean(true); in HksConstructJSIReturnResult()
389 res = JSI::CreateObject(); in HksConstructJSIReturnResult()
398 JSI::ReleaseValue(buffer); in HksConstructJSIReturnResult()
[all …]
/ohos5.0/base/powermgr/powermgr_lite/interfaces/kits/battery/js/builtin/src/
H A Dbattery_module.cpp24 if (JSI::ValueIsUndefined(args)) { in SuccessCallBack()
29 if (!JSI::ValueIsUndefined(success)) { in SuccessCallBack()
30 if (JSI::ValueIsUndefined(jsiValue)) { in SuccessCallBack()
36 if (!JSI::ValueIsUndefined(complete)) { in SuccessCallBack()
37 JSI::CallFunction(complete, thisVal, nullptr, 0); in SuccessCallBack()
39 JSI::ReleaseValueList(success, complete, ARGS_END); in SuccessCallBack()
44 JSIValue undefValue = JSI::CreateUndefined(); in GetStatus()
52 JSIValue result = JSI::CreateObject(); in GetStatus()
53 JSI::SetBooleanProperty(result, "charging", charging); in GetStatus()
54 JSI::SetNumberProperty(result, "level", level); in GetStatus()
[all …]
/ohos5.0/commonlibrary/utils_lite/js/builtin/kvstorekit/src/
H A Dnativeapi_kv.cpp64 result = JSI::CreateString(""); in GetDefault()
66 result = JSI::CreateString(defaultValue); in GetDefault()
68 JSI::ReleaseString(defaultValue); in GetDefault()
70 JSI::ReleaseValue(result); in GetDefault()
112 params->args = JSI::AcquireValue(args[0]); in ExecuteAsyncWork()
128 JSIValue result = JSI::CreateUndefined(); in ExecuteGet()
149 result = JSI::CreateString(value); in ExecuteGet()
153 JSI::ReleaseString(key); in ExecuteGet()
190 JSI::ReleaseString(key); in ExecuteSet()
191 JSI::ReleaseString(value); in ExecuteSet()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/module_manager/test/unittest/common/
H A Drequire_module_tdd_test.cpp51 JSI::ReleaseValue(moduleRequired); in RequireModuleTest001()
67 JSI::ReleaseValue(moduleRequired); in RequireModuleTest002()
83 JSI::ReleaseValue(moduleRequired); in RequireModuleTest003()
99 JSI::ReleaseValue(moduleRequired); in RequireModuleTest004()
123 EXPECT_FALSE(JSI::ValueIsUndefined(jFunc)); in RequireModuleTest005()
132 EXPECT_TRUE(JSI::ValueIsUndefined(result)); in RequireModuleTest005()
157 EXPECT_FALSE(JSI::ValueIsUndefined(jFunc)); in RequireModuleTest006()
166 EXPECT_TRUE(JSI::ValueIsUndefined(result)); in RequireModuleTest006()
191 EXPECT_FALSE(JSI::ValueIsUndefined(jFunc)); in RequireModuleTest007()
200 EXPECT_TRUE(JSI::ValueIsError(result)); in RequireModuleTest007()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/dialog/
H A Djs_dialog.cpp138 JSI::ReleaseString(buttonText); in ParseButton()
139 JSI::ReleaseString(buttonColorText); in ParseButton()
140 JSI::ReleaseValue(buttonObject); in ParseButton()
145 JSI::ReleaseString(buttonText); in ParseButton()
146 JSI::ReleaseString(buttonColorText); in ParseButton()
147 JSI::ReleaseValue(buttonObject); in ParseButton()
187 jsContext_(JSI::AcquireValue(context)) {} in DialogListener()
195 args[0] = JSI::CreateObject(); in OnClick()
199 if (JSI::ValueIsFunction(jsSuccessFunc_)) { in OnClick()
215 jsContext_(JSI::AcquireValue(context)) {} in DismissListener()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/native_engine/jsi/
H A Djsi.cpp28 JSIValue JSI::GetGlobalObject() in GetGlobalObject()
38 JSIValue JSI::CreateObject() in CreateObject()
206 JSIValue JSI::CreateUndefined() in CreateUndefined()
236 bool JSI::ValueIsNumber(JSIValue value) in ValueIsNumber()
266 bool JSI::ValueIsNull(JSIValue value) in ValueIsNull()
286 bool JSI::ValueIsError(JSIValue value) in ValueIsError()
409 void JSI::ReleaseValue(JSIValue value) in ReleaseValue()
420 void JSI::ReleaseString(char *&str) in ReleaseString()
475 JSIValue JSI::CreateNumberNaN() in CreateNumberNaN()
571 JSIValue JSI::CreateNull() in CreateNull()
[all …]
/ohos5.0/base/security/permission_lite/services/js_api/src/
H A Dperm_module.cpp25 JSIValue undefValue = JSI::CreateUndefined(); in CheckSelfPerm()
30 JSIValue success = JSI::GetNamedProperty(args[0], CB_SUCCESS); in CheckSelfPerm()
31 JSIValue fail = JSI::GetNamedProperty(args[0], CB_FAIL); in CheckSelfPerm()
32 JSIValue complete = JSI::GetNamedProperty(args[0], CB_COMPLETE); in CheckSelfPerm()
33 char *permission = JSI::GetStringProperty(args[0], "permission"); in CheckSelfPerm()
36 JSIValue code = JSI::CreateNumber(ret); in CheckSelfPerm()
40 JSI::CallFunction(fail, thisVal, argv, ARGC_ONE); in CheckSelfPerm()
44 JSI::CallFunction(success, thisVal, argv, ARGC_ONE); in CheckSelfPerm()
47 JSI::ReleaseString(permission); in CheckSelfPerm()
48 JSI::CallFunction(complete, thisVal, nullptr, 0); in CheckSelfPerm()
[all …]
/ohos5.0/base/hiviewdfx/hilog_lite/test/unittest/
H A Dhilog_lite_test.cpp240 ACELite::JSIValue undefValue = ACELite::JSI::CreateUndefined(); in HWTEST_F()
256 ACELite::JSIValue undefValue = ACELite::JSI::CreateUndefined(); in HWTEST_F()
272 ACELite::JSIValue undefValue = ACELite::JSI::CreateUndefined(); in HWTEST_F()
288 ACELite::JSIValue undefValue = ACELite::JSI::CreateUndefined(); in HWTEST_F()
304 ACELite::JSIValue undefValue = ACELite::JSI::CreateUndefined(); in HWTEST_F()
322 args[ARG_NUMBER_ZERO] = ACELite::JSI::CreateNumber(STRING_SIZE); in HWTEST_F()
326 EXPECT_TRUE(ACELite::JSI::ValueToBoolean(resultValue) == true); in HWTEST_F()
344 EXPECT_TRUE(ACELite::JSI::ValueToBoolean(resultValue) == true); in HWTEST_F()
362 EXPECT_TRUE(ACELite::JSI::ValueToBoolean(resultValue) == true); in HWTEST_F()
380 EXPECT_TRUE(ACELite::JSI::ValueToBoolean(resultValue) == true); in HWTEST_F()
[all …]
/ohos5.0/base/global/i18n_lite/interfaces/kits/js/builtin/src/
H A Dlocale_module.cpp60 JSI::SetModuleAPI(exports, "getLocale", LocaleModule::GetLocale); in InitLocaleModule()
65 JSIValue result = JSI::CreateObject(); in GetLocale()
68 JSI::ReleaseValue(result); in GetLocale()
69 return JSI::CreateUndefined(); in GetLocale()
71 JSI::SetStringProperty(result, "language", lang); in GetLocale()
76 JSI::ReleaseValue(result); in GetLocale()
77 return JSI::CreateUndefined(); in GetLocale()
79 JSI::SetStringProperty(result, "countryOrRegion", region); in GetLocale()
84 JSI::ReleaseValue(result); in GetLocale()
85 return JSI::CreateUndefined(); in GetLocale()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/module_manager/
H A Dmodule_manager.cpp36 return JSI::CreateUndefined(); in RequireModule()
57 moduleObj = JSI::CreateUndefined(); in RequireModule()
140 return JSI::CreateUndefined(); in GetModuleObject()
144 return JSI::CreateUndefined(); in GetModuleObject()
159 return JSI::CreateUndefined(); in GetModuleObject()
173 return JSI::CreateUndefined(); in GetModuleObject()
198 JSI::ReleaseValue(exports); in InitModuleObject()
277 if (!JSI::ValueIsObject(object)) { in GetObjectPointer()
292 if (!JSI::ValueIsObject(object)) { in GetObjectNamedPointer()
297 if (JSI::ValueIsObject(funObj)) { in GetObjectNamedPointer()
[all …]

123