/base/startup/init/interfaces/kits/jskits/src/ |
D | native_deviceinfo_js.cpp | 40 napi_value napiValue = nullptr; in GetManufacture() local 46 … NAPI_CALL(env, napi_create_string_utf8(env, manfactureName, strlen(manfactureName), &napiValue)); in GetManufacture() 47 return napiValue; in GetManufacture() 52 napi_value napiValue = nullptr; in GetBrand() local 58 NAPI_CALL(env, napi_create_string_utf8(env, productBrand, strlen(productBrand), &napiValue)); in GetBrand() 59 return napiValue; in GetBrand() 64 napi_value napiValue = nullptr; in GetMarketName() local 70 NAPI_CALL(env, napi_create_string_utf8(env, marketName, strlen(marketName), &napiValue)); in GetMarketName() 71 return napiValue; in GetMarketName() 76 napi_value napiValue = nullptr; in GetProductSeries() local [all …]
|
D | native_parameters_js.cpp | 156 napi_value napiValue = nullptr; in SetSync() local 162 napi_get_undefined(env, &napiValue); in SetSync() 164 return napiValue; in SetSync() 210 napi_value napiValue = nullptr; in GetSync() local 212 …PI_CALL(env, napi_create_string_utf8(env, getValue.c_str(), strlen(getValue.c_str()), &napiValue)); in GetSync() 214 return napiValue; in GetSync()
|
/base/powermgr/battery_manager/frameworks/napi/ |
D | battery_info.cpp | 33 napi_value napiValue = nullptr; in BatterySOC() local 36 NAPI_CALL(env, napi_create_int32(env, capacity, &napiValue)); in BatterySOC() 39 return napiValue; in BatterySOC() 44 napi_value napiValue = nullptr; in GetChargingState() local 47 NAPI_CALL(env, napi_create_int32(env, chargingState, &napiValue)); in GetChargingState() 51 return napiValue; in GetChargingState() 56 napi_value napiValue = nullptr; in GetHealthState() local 59 NAPI_CALL(env, napi_create_int32(env, healthStatus, &napiValue)); in GetHealthState() 63 return napiValue; in GetHealthState() 68 napi_value napiValue = nullptr; in GetPluggedType() local [all …]
|
/base/powermgr/battery_statistics/frameworks/napi/src/ |
D | napi_utils.cpp | 61 napi_value napiValue = nullptr; in SetIntValue() local 62 napi_create_int32(env, value, &napiValue); in SetIntValue() 63 napi_set_named_property(env, result, fieldStr.c_str(), napiValue); in SetIntValue() 68 napi_value napiValue = nullptr; in SetDoubleValue() local 69 napi_create_double(env, value, &napiValue); in SetDoubleValue() 70 napi_set_named_property(env, result, fieldStr.c_str(), napiValue); in SetDoubleValue()
|
/base/web/webview/interfaces/kits/napi/webviewcontroller/ |
D | webview_javascript_result_callback.cpp | 177 napi_value napiValue = nullptr; in ParseNwebValue2NapiValue() local 181 napi_create_int32(env, value->GetInt(), &napiValue); in ParseNwebValue2NapiValue() 182 argv.push_back(napiValue); in ParseNwebValue2NapiValue() 185 napi_create_double(env, value->GetDouble(), &napiValue); in ParseNwebValue2NapiValue() 186 argv.push_back(napiValue); in ParseNwebValue2NapiValue() 189 napi_get_boolean(env, value->GetBoolean(), &napiValue); in ParseNwebValue2NapiValue() 190 argv.push_back(napiValue); in ParseNwebValue2NapiValue() 193 napi_create_string_utf8(env, value->GetString().c_str(), NAPI_AUTO_LENGTH, &napiValue); in ParseNwebValue2NapiValue() 194 argv.push_back(napiValue); in ParseNwebValue2NapiValue() 199 napi_create_string_utf8(env, msgStr.c_str(), msgStr.length(), &napiValue); in ParseNwebValue2NapiValue() [all …]
|
/base/telephony/sms_mms/frameworks/js/napi/src/ |
D | napi_mms.cpp | 753 bool GetNapiBooleanValue(napi_env env, napi_value napiValue, std::string name, bool defValue = fals… in GetNapiBooleanValue() argument 755 napi_value value = NapiUtil::GetNamedProperty(env, napiValue, name); in GetNapiBooleanValue() 765 std::string GetNapiStringValue(napi_env env, napi_value napiValue, std::string name, std::string de… in GetNapiStringValue() argument 767 napi_value value = NapiUtil::GetNamedProperty(env, napiValue, name); in GetNapiStringValue() 775 int32_t GetNapiInt32Value(napi_env env, napi_value napiValue, std::string name, int32_t defValue = … in GetNapiInt32Value() argument 777 napi_value value = NapiUtil::GetNamedProperty(env, napiValue, name); in GetNapiInt32Value() 788 int64_t GetNapiInt64Value(napi_env env, napi_value napiValue, std::string name, int64_t defValue = … in GetNapiInt64Value() argument 790 napi_value value = NapiUtil::GetNamedProperty(env, napiValue, name); in GetNapiInt64Value() 801 uint32_t GetNapiUint32Value(napi_env env, napi_value napiValue, std::string name, uint32_t defValue… in GetNapiUint32Value() argument 803 napi_value value = NapiUtil::GetNamedProperty(env, napiValue, name); in GetNapiUint32Value() [all …]
|
/base/powermgr/power_manager/frameworks/napi/power/ |
D | power_napi.cpp | 49 napi_value napiValue; in IsActive() local 50 NAPI_CALL(env, napi_get_boolean(env, isScreen, &napiValue)); in IsActive() 51 return napiValue; in IsActive() 133 napi_value napiValue; in GetPowerMode() local 134 NAPI_CALL(env, napi_create_uint32(env, static_cast<uint32_t>(mode), &napiValue)); in GetPowerMode() 135 return napiValue; in GetPowerMode() 249 napi_value napiValue; in IsStandby() local 250 NAPI_CALL(env, napi_get_boolean(env, isStandby, &napiValue)); in IsStandby() 251 return napiValue; in IsStandby()
|
/base/useriam/user_auth_framework/frameworks/js/napi/user_auth/src/ |
D | user_auth_napi_helper.cpp | 385 napi_value napiValue = nullptr; in SetInt32Property() local 386 napi_status ret = napi_create_int32(env, value, &napiValue); in SetInt32Property() 391 ret = napi_set_named_property(env, obj, name, napiValue); in SetInt32Property() 400 napi_value napiValue = nullptr; in SetUint32Property() local 401 napi_status ret = napi_create_uint32(env, value, &napiValue); in SetUint32Property() 406 ret = napi_set_named_property(env, obj, name, napiValue); in SetUint32Property() 430 napi_value napiValue; in SetUint8ArrayProperty() local 431 ret = napi_create_typedarray(env, napi_uint8_array, size, buffer, 0, &napiValue); in SetUint8ArrayProperty() 436 ret = napi_set_named_property(env, obj, name, napiValue); in SetUint8ArrayProperty()
|
/base/sensors/medical_sensor/interfaces/plugin/test/unittest/ |
D | medical_js_test.cpp | 91 napi_value napiValue = nullptr; variable 92 napi_create_uint32(env, cppValue, &napiValue); 94 bool ret = IsMatchType(napiValue, napi_number, env); 110 napi_value napiValue = nullptr; variable 111 napi_create_string_utf8(env, cppValue, cppValueStrLength, &napiValue); 114 bool ret = IsMatchType(napiValue, napi_string, env);
|
/base/startup/init/interfaces/kits/jskits/src_enhance/ |
D | native_parameters_js.cpp | 221 napi_value napiValue = nullptr; in SetSync() local 226 napi_get_undefined(env, &napiValue); in SetSync() 228 return napiValue; in SetSync() 278 napi_value napiValue = nullptr; in GetSync() local 279 NAPI_CALL(env, napi_create_string_utf8(env, value.data(), strlen(value.data()), &napiValue)); in GetSync() 280 return napiValue; in GetSync()
|
/base/powermgr/thermal_manager/frameworks/napi/ |
D | thermal_manager_napi.cpp | 201 napi_value napiValue; in GetThermalLevel() local 202 NAPI_CALL(env, napi_create_int32(env, levelValue, &napiValue)); in GetThermalLevel() 205 return napiValue; in GetThermalLevel()
|
/base/notification/eventhandler/frameworks/napi/src/ |
D | events_emitter.cpp | 63 napi_value napiValue = nullptr; in TransToEventData() local 67 napi_get_boolean(env, val.value.bValue, &napiValue); in TransToEventData() 71 napi_create_int32(env, val.value.nValue, &napiValue); in TransToEventData() 75 napi_create_string_utf8(env, val.value.cValue, NAPI_AUTO_LENGTH, &napiValue); in TransToEventData() 81 napi_set_named_property(env, data, key.c_str(), napiValue); in TransToEventData()
|
/base/powermgr/display_manager/frameworks/napi/ |
D | brightness.cpp | 274 napi_value napiValue = 0; in GetResult() local 275 NAPI_CALL(env, napi_create_int32(env, it.second, &napiValue)); in GetResult() 276 NAPI_CALL(env, napi_set_named_property(env, result, it.first.c_str(), napiValue)); in GetResult()
|
/base/inputmethod/imf/frameworks/js/napi/inputmethodability/ |
D | js_text_input_client_engine.cpp | 191 napi_value napiValue = nullptr; in GetSelectRange() local 192 status = napi_get_named_property(env, argv, "start", &napiValue); in GetSelectRange() 194 status = JsUtils::GetValue(env, napiValue, ctxt->start); in GetSelectRange() 197 status = napi_get_named_property(env, argv, "end", &napiValue); in GetSelectRange() 199 status = JsUtils::GetValue(env, napiValue, ctxt->end); in GetSelectRange() 210 napi_value napiValue = nullptr; in GetSelectMovement() local 211 status = napi_get_named_property(env, argv, "direction", &napiValue); in GetSelectMovement() 213 status = JsUtils::GetValue(env, napiValue, ctxt->direction); in GetSelectMovement()
|
/base/usb/usb_manager/interfaces/kits/js/napi/src/ |
D | usb_info.cpp | 517 napi_value napiValue = nullptr; in CoreHasRight() local 518 napi_get_boolean(env, result, &napiValue); in CoreHasRight() 520 return napiValue; in CoreHasRight() 774 napi_value napiValue = nullptr; in PortGetSupportedModes() local 775 NAPI_CHECK(env, napi_create_int32(env, result, &napiValue), "Create int32 failed"); in PortGetSupportedModes() 777 return napiValue; in PortGetSupportedModes()
|
/base/account/os_account/interfaces/kits/napi/osaccount/src/ |
D | napi_os_account.cpp | 802 napi_value napiValue = nullptr; in GetOsAccountLocalIdForUidSync() local 807 return napiValue; in GetOsAccountLocalIdForUidSync() 813 return napiValue; in GetOsAccountLocalIdForUidSync() 815 NAPI_CALL(env, napi_create_int32(env, localId, &napiValue)); in GetOsAccountLocalIdForUidSync() 816 return napiValue; in GetOsAccountLocalIdForUidSync()
|