Lines Matching refs:status
75 napi_status status = napi_define_class(env, "I18NUtil", NAPI_AUTO_LENGTH, JSUtils::DefaultConstructor, nullptr,
77 if (status != napi_ok) {
82 status = napi_set_named_property(env, exports, "I18NUtil", constructor);
83 if (status != napi_ok) {
127 napi_status status = napi_get_value_string_utf8(env, option, styleBuf.data(), len + 1, &len);
128 if (status != napi_ok) {
142 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
143 if (status != napi_ok) {
161 status = napi_get_value_string_utf8(env, argv[3], localeBuf.data(), len + 1, &len);
162 if (status != napi_ok) {
180 status = napi_create_string_utf8(env, value.c_str(), NAPI_AUTO_LENGTH, &result);
181 if (status != napi_ok) {
194 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
195 if (status != napi_ok) {
201 status = napi_get_value_string_utf8(env, argv[0], languageBuf.data(), len + 1, &len);
202 if (status != napi_ok) {
209 status = napi_create_string_utf8(env, value.c_str(), NAPI_AUTO_LENGTH, &result);
210 if (status != napi_ok) {
261 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
262 if (status != napi_ok) {
276 status = napi_get_value_int32(env, argv[0], &hour);
277 if (status != napi_ok) {
360 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
361 if (status != napi_ok || argc < 2) { // 2 is the request param num.
387 status = napi_create_string_utf8(env, bestMatchLocaleTag.c_str(), NAPI_AUTO_LENGTH, &result);
388 if (status != napi_ok) {
401 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
402 if (status != napi_ok) {
427 status = napi_create_string_utf8(env, language.c_str(), NAPI_AUTO_LENGTH, &result);
428 if (status != napi_ok || language == "") {
442 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
443 if (status != napi_ok) {
468 status = napi_create_string_utf8(env, country.c_str(), NAPI_AUTO_LENGTH, &result);
469 if (status != napi_ok || country == "") {
483 napi_status status = napi_define_class(env, "Transliterator", NAPI_AUTO_LENGTH, I18nTransliteratorConstructor,
485 if (status != napi_ok) {
495 status = napi_create_reference(env, constructor, 1, g_transConstructor);
496 if (status != napi_ok) {
510 napi_status status = napi_define_class(env, "I18nTransliterator", NAPI_AUTO_LENGTH, JSUtils::DefaultConstructor,
512 if (status != napi_ok) {
516 status = napi_set_named_property(env, exports, "Transliterator", constructor);
517 if (status != napi_ok) {
530 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
531 if (status != napi_ok) {
547 status =
549 if (status != napi_ok) {
563 UErrorCode status = U_ZERO_ERROR;
565 icu::Transliterator *trans = icu::Transliterator::createInstance(unistr, UTransDirection::UTRANS_FORWARD, status);
566 if (U_FAILURE(status) || (trans == nullptr)) {
581 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
582 if (status != napi_ok || !obj || !obj->transliterator_) {
596 status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
597 if (status != napi_ok) {
602 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
603 if (status != napi_ok) {
612 status = napi_create_string_utf8(env, temp.c_str(), NAPI_AUTO_LENGTH, &value);
613 if (status != napi_ok) {
626 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
627 if (status != napi_ok) {
668 napi_status status = napi_get_reference_value(env, *g_transConstructor, &constructor);
669 if (status != napi_ok) {
674 status = napi_new_instance(env, constructor, 1, argv, &result); // 2 arguments
675 if (status != napi_ok) {
688 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
689 if (status != napi_ok) {
695 status = napi_get_value_string_utf8(env, argv[0], localeBuf.data(), len + 1, &len);
696 if (status != napi_ok) {
702 status = napi_get_boolean(env, isRTL, &result);
703 if (status != napi_ok) {
712 napi_status status = napi_ok;
720 status = napi_define_class(env, "PhoneNumberFormat", NAPI_AUTO_LENGTH, PhoneNumberFormatConstructor, nullptr,
722 if (status != napi_ok) {
727 status = napi_set_named_property(env, exports, "PhoneNumberFormat", constructor);
728 if (status != napi_ok) {
741 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
742 if (status != napi_ok) {
752 status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
753 if (status != napi_ok) {
758 status = napi_get_value_string_utf8(env, argv[0], country.data(), len + 1, &len);
759 if (status != napi_ok) {
769 status = napi_wrap(env, thisVar, reinterpret_cast<void *>(obj.get()),
771 if (status != napi_ok) {
786 napi_status status = napi_get_global(env, &global);
787 if (status != napi_ok) {
812 napi_status status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
813 if (status != napi_ok) {
818 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
819 if (status != napi_ok) {
825 status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
826 if (status != napi_ok || !obj || !obj->phonenumberfmt_) {
834 status = napi_get_boolean(env, isValid, &result);
835 if (status != napi_ok) {
862 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
863 if (status != napi_ok || !obj || !obj->phonenumberfmt_) {
870 status = napi_create_string_utf8(env, resStr.c_str(), NAPI_AUTO_LENGTH, &result);
871 if (status != napi_ok) {
894 napi_status status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
895 if (status != napi_ok) {
900 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
901 if (status != napi_ok) {
907 status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
908 if (status != napi_ok || !obj || !obj->phonenumberfmt_) {
916 status = napi_create_string_utf8(env, formattedPhoneNumber.c_str(), NAPI_AUTO_LENGTH, &result);
917 if (status != napi_ok) {
933 napi_status status = napi_define_class(env, "IndexUtil", NAPI_AUTO_LENGTH, I18nIndexUtilConstructor, nullptr,
935 if (status != napi_ok) {
940 status = napi_create_reference(env, constructor, 1, &g_indexUtilConstructor);
941 if (status != napi_ok) {
952 napi_status status = napi_define_class(env, "I18nIndexUtil", NAPI_AUTO_LENGTH, JSUtils::DefaultConstructor,
954 if (status != napi_ok) {
958 status = napi_set_named_property(env, exports, "IndexUtil", constructor);
959 if (status != napi_ok) {
972 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
973 if (status != napi_ok) {
989 status =
991 if (status != napi_ok) {
1018 napi_status status = napi_define_class(env, "BreakIterator", NAPI_AUTO_LENGTH, I18nBreakIteratorConstructor,
1020 if (status != napi_ok) {
1030 status = napi_create_reference(env, constructor, 1, g_brkConstructor);
1031 if (status != napi_ok) {
1042 napi_status status = napi_define_class(env, "I18nBreakIterator", NAPI_AUTO_LENGTH, JSUtils::DefaultConstructor,
1044 if (status != napi_ok) {
1048 status = napi_set_named_property(env, exports, "BreakIterator", constructor);
1049 if (status != napi_ok) {
1064 napi_status status = napi_get_reference_value(env, *g_brkConstructor, &constructor);
1065 if (status != napi_ok) {
1073 status = napi_new_instance(env, constructor, 1, argv, &result); // 1 arguments
1074 if (status != napi_ok) {
1089 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1090 if (status != napi_ok || !obj || !obj->brkiter_) {
1096 status = napi_create_int32(env, value, &result);
1097 if (status != napi_ok) {
1112 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1113 if (status != napi_ok || !obj || !obj->brkiter_) {
1119 status = napi_create_int32(env, value, &result);
1120 if (status != napi_ok) {
1135 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1136 if (status != napi_ok || !obj || !obj->brkiter_) {
1142 status = napi_create_int32(env, value, &result);
1143 if (status != napi_ok) {
1158 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1159 if (status != napi_ok || !obj || !obj->brkiter_) {
1165 status = napi_create_int32(env, value, &result);
1166 if (status != napi_ok) {
1181 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1182 if (status != napi_ok || !obj || !obj->brkiter_) {
1194 status = napi_get_value_int32(env, argv[0], &value);
1195 if (status != napi_ok) {
1202 status = napi_create_int32(env, value, &result);
1203 if (status != napi_ok) {
1218 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1219 if (status != napi_ok || !obj || !obj->brkiter_) {
1233 status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
1234 if (status != napi_ok) {
1239 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
1240 if (status != napi_ok) {
1256 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1257 if (status != napi_ok || !obj || !obj->brkiter_) {
1264 status = napi_create_string_utf8(env, temp.c_str(), NAPI_AUTO_LENGTH, &value);
1265 if (status != napi_ok) {
1280 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1281 if (status != napi_ok || !obj || !obj->brkiter_) {
1295 status = napi_get_value_int32(env, argv[0], &value);
1296 if (status != napi_ok) {
1302 status = napi_create_int32(env, value, &result);
1303 if (status != napi_ok) {
1318 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1319 if (status != napi_ok || !obj || !obj->brkiter_) {
1333 status = napi_get_value_int32(env, argv[0], &value);
1334 if (status != napi_ok) {
1340 status = napi_get_boolean(env, boundary, &result);
1341 if (status != napi_ok) {
1354 napi_status status = napi_get_cb_info(env, info, &argc, argv, &thisVar, &data);
1355 if (status != napi_ok) {
1367 status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
1368 if (status != napi_ok) {
1373 status = napi_get_value_string_utf8(env, argv[0], localeBuf.data(), len + 1, &len);
1374 if (status != napi_ok) {
1382 status =
1384 if (status != napi_ok) {
1398 napi_status status = napi_get_global(env, &global);
1399 if (status != napi_ok) {
1416 napi_status status = napi_get_reference_value(env, g_indexUtilConstructor, &constructor);
1417 if (status != napi_ok) {
1423 status = napi_new_instance(env, constructor, 0, argv, &result);
1425 status = napi_new_instance(env, constructor, 1, argv, &result);
1427 if (status != napi_ok) {
1441 napi_status status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1442 if (status != napi_ok || !obj || !obj->indexUtil_) {
1449 status = napi_create_array_with_length(env, indexList.size(), &result);
1450 if (status != napi_ok) {
1456 status = napi_create_string_utf8(env, indexList[i].c_str(), NAPI_AUTO_LENGTH, &element);
1457 if (status != napi_ok) {
1461 status = napi_set_element(env, result, i, element);
1462 if (status != napi_ok) {
1484 napi_status status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
1485 if (status != napi_ok) {
1490 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
1491 if (status != napi_ok) {
1496 status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1497 if (status != napi_ok || !obj || !obj->indexUtil_) {
1519 napi_status status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &len);
1520 if (status != napi_ok) {
1525 status = napi_get_value_string_utf8(env, argv[0], buf.data(), len + 1, &len);
1526 if (status != napi_ok) {
1531 status = napi_unwrap(env, thisVar, reinterpret_cast<void **>(&obj));
1532 if (status != napi_ok || !obj || !obj->indexUtil_) {
1538 status = napi_create_string_utf8(env, index.c_str(), NAPI_AUTO_LENGTH, &result);
1539 if (status != napi_ok) {
1550 napi_status status = napi_get_cb_info(env, info, nullptr, nullptr, &thisVar, &data);
1551 if (status != napi_ok) {
1556 status =
1558 if (status != napi_ok) {
1568 napi_status status = napi_ok;
1574 status = napi_define_class(env, "Util", NAPI_AUTO_LENGTH, ObjectConstructor, nullptr,
1576 if (status != napi_ok) {
1581 status = napi_set_named_property(env, exports, "Util", constructor);
1582 if (status != napi_ok) {