/foundation/communication/dsoftbus/tests/core/adapter/unittest/ |
H A D | lnn_kv_adapter_wrapper_test.cpp | 29 constexpr int32_t MAX_STRING_LEN = 4096; member 82 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN, valueStr.c_str(), MAX_STRING_LEN), in HWTEST_F() 85 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN, valueStr.c_str(), MAX_STRING_LEN), in HWTEST_F() 87 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN, valueStr.c_str(), MAX_STRING_LEN + 1), in HWTEST_F() 89 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN, valueStr.c_str(), MIN_STRING_LEN - 1), in HWTEST_F() 92 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN, valuePtr, MIN_STRING_LEN - 1), in HWTEST_F() 94 EXPECT_EQ(LnnPutDBData(dbId, keyStr.c_str(), MAX_STRING_LEN in HWTEST_F() [all...] |
H A D | lnn_kv_adapter_test.cpp | 32 constexpr int32_t MAX_STRING_LEN = 4096; member 134 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 142 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 263 * @tc.desc: DeleteByPrefix failed, keyPrefix length exceeds MAX_STRING_LEN. 269 std::string keyPrefix(MAX_STRING_LEN + 1, 'a'); in HWTEST_F()
|
/foundation/communication/dsoftbus/core/adapter/bus_center/src/ |
H A D | lnn_kv_adapter_wrapper.cpp | 37 constexpr int32_t MAX_STRING_LEN = 4096; member 50 if (dbId == nullptr || appId == nullptr || appIdLen < MIN_STRING_LEN || appIdLen > MAX_STRING_LEN || in LnnCreateKvAdapter() 51 storeId == nullptr || storeIdLen < MIN_STRING_LEN || storeIdLen > MAX_STRING_LEN) { in LnnCreateKvAdapter() 125 if (key == nullptr || keyLen < MIN_STRING_LEN || keyLen > MAX_STRING_LEN || value == nullptr || in LnnPutDBData() 126 valueLen < MIN_STRING_LEN || valueLen > MAX_STRING_LEN || dbId < MIN_DBID_COUNT || dbId >= g_dbId) { in LnnPutDBData() 152 if (key == nullptr || keyLen < MIN_STRING_LEN || keyLen > MAX_STRING_LEN || dbId < MIN_DBID_COUNT || in LnnDeleteDBData() 179 if (value == nullptr || key == nullptr || keyLen < MIN_STRING_LEN || keyLen > MAX_STRING_LEN || in LnnGetDBData() 210 if (keyPrefix == nullptr || keyPrefixLen < MIN_STRING_LEN || keyPrefixLen > MAX_STRING_LEN || in LnnDeleteDBDataByPrefix() 251 appIdLen > MAX_STRING_LEN || storeId == nullptr || storeIdLen < MIN_STRING_LEN || in LnnRegisterDataChangeListener() 252 storeIdLen > MAX_STRING_LEN) { in LnnRegisterDataChangeListener() [all...] |
/foundation/multimodalinput/input/frameworks/napi/input_monitor/src/ |
H A D | js_input_monitor_module.cpp | 58 char typeName[MAX_STRING_LEN] = { 0 }; in JsOnApi9() 60 CHKRP(napi_get_value_string_utf8(env, argv[0], typeName, MAX_STRING_LEN - 1, &len), GET_VALUE_STRING_UTF8); in JsOnApi9() 129 char typeName[MAX_STRING_LEN] = { 0 }; in AddMonitor() 131 CHKRP(napi_get_value_string_utf8(env, argv[0], typeName, MAX_STRING_LEN - 1, &len), GET_VALUE_STRING_UTF8); in AddMonitor() 197 char typeName[MAX_STRING_LEN] = { 0 }; in JsOffApi9() 199 CHKRP(napi_get_value_string_utf8(env, argv[0], typeName, MAX_STRING_LEN - 1, &len), GET_VALUE_STRING_UTF8); in JsOffApi9() 245 char typeName[MAX_STRING_LEN] = { 0 }; in RemoveMonitor() 247 CHKRP(napi_get_value_string_utf8(env, argv[0], typeName, MAX_STRING_LEN - 1, &len), GET_VALUE_STRING_UTF8); in RemoveMonitor()
|
/foundation/deviceprofile/device_info_manager/services/core/src/staticcapabilityloader/ |
H A D | static_capability_loader.cpp | 78 if (filePath.empty() || filePath.size() > MAX_STRING_LEN) { in LoadJsonFile() 150 if (deviceId.empty() || deviceId.size() > MAX_STRING_LEN) { in GetStaticInfoByVersion() 158 if (staticVersion.empty() || staticVersion.size() > MAX_STRING_LEN) { in GetStaticInfoByVersion() 199 if (staticVersion.empty() || staticVersion.size() > MAX_STRING_LEN) { in GetStaticInfoJsonByVersion() 254 if (deviceId.empty() || deviceId.size() > MAX_STRING_LEN) { in GenerateStaticProfiles() 307 if (staticCapability.empty() || staticCapability.size() > MAX_STRING_LEN) { in LoadStaticInfo() 338 if (deviceId.empty() || deviceId.size() > MAX_STRING_LEN) { in LoadStaticProfiles() 342 if (staticCapability.empty() || staticCapability.size() > MAX_STRING_LEN) { in LoadStaticProfiles() 346 if (staticVersion.empty() || staticVersion.size() > MAX_STRING_LEN) { in LoadStaticProfiles() 418 if (handlerName.empty() || handlerName.size() > MAX_STRING_LEN) { in SetStaticCapabilityFlag() [all...] |
/foundation/deviceprofile/device_info_manager/common/src/utils/ |
H A D | profile_utils.cpp | 170 if (key.length() == 0 || key.length() > MAX_STRING_LEN) { in GetProfileType() 202 if (dbKey.length() == 0 || dbKey.length() > MAX_STRING_LEN) { in GetProfileKey() 211 if (dbKey.length() == 0 || dbKey.length() > MAX_STRING_LEN) { in GetDeviceIdByDBKey() 226 if (dbKey.length() == 0 || dbKey.length() > MAX_STRING_LEN) { in GetServiceNameByDBKey() 250 if (profileName.length() == 0 || profileName.length() > MAX_STRING_LEN) { in IsNeedAddOhSuffix() 282 if (dbKey.length() == 0 || dbKey.length() > MAX_STRING_LEN) { in GetCharKeyByDBKey() 330 if (key.length() == 0 || key.length() > MAX_STRING_LEN) { in IsKeyValid() 342 if (udid.length() == 0 || udid.length() > MAX_STRING_LEN) { in IsLocalUdid() 627 if (IsPropertyValid(propertiesMap, OS_SYS_CAPACITY, MAX_STRING_LEN)) { in EntriesToDeviceProfile() 630 if (IsPropertyValid(propertiesMap, OS_VERSION, MAX_STRING_LEN)) { in EntriesToDeviceProfile() [all...] |
/foundation/deviceprofile/device_info_manager/services/core/src/staticcapabilitycollector/ |
H A D | static_capability_collector.cpp | 81 if (staticVersion.empty() || staticVersion.size() >= MAX_STRING_LEN) { in AddStaticCapabilityToDB() 85 if (staticCapability.empty() || staticCapability.size() >= MAX_STRING_LEN) { in AddStaticCapabilityToDB()
|
/foundation/distributedhardware/device_manager/utils/src/kvadapter/ |
H A D | kv_adapter.cpp | 39 constexpr int32_t MAX_STRING_LEN = 4096; member 99 if (key.empty() || key.size() > MAX_STRING_LEN || value.empty() || value.size() > MAX_STRING_LEN) { in Put()
|
/foundation/deviceprofile/device_info_manager/old/services/core/src/contentsensor/ |
H A D | system_info_collector.cpp | 55 if (osFullName.empty() || osFullName.size() >= DistributedDeviceProfile::MAX_STRING_LEN) { in GetOsType()
|
/foundation/communication/dsoftbus/core/adapter/kv_store/src/ |
H A D | lnn_kv_adapter.cpp | 33 constexpr int32_t MAX_STRING_LEN = 4096; member 151 if (key.empty() || key.size() > MAX_STRING_LEN || value.empty() || value.size() > MAX_STRING_LEN) { in Put() 242 if (keyPrefix.empty() || keyPrefix.size() > MAX_STRING_LEN) { in DeleteByPrefix()
|
/foundation/deviceprofile/device_info_manager/services/core/test/unittest/ |
H A D | static_capability_loader_test.cpp | 109 std::string filePath(MAX_STRING_LEN + 1, 'a'); in HWTEST_F() 500 std::string longDeviceId(MAX_STRING_LEN + 1, 'a'); in HWTEST_F() 566 std::string staticCapability(MAX_STRING_LEN + 1, 'a'); in HWTEST_F() 739 std::string handlerName(MAX_STRING_LEN + 1, 'a'); in HWTEST_F() 770 std::string handlerLoc(MAX_STRING_LEN + 1, 'a'); in HWTEST_F()
|
H A D | kv_adapter_test.cpp | 145 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 153 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F()
|
H A D | profile_utils_test.cpp | 1595 bool ret1 = ProfileUtils::IsPropertyValid(propertiesMap, DEVICE_NAME, MAX_STRING_LEN); in HWTEST_F() 1624 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 1632 EXPECT_EQ(true, propertiesMap[SERVICE_TYPE].length() < MAX_STRING_LEN); in HWTEST_F() 1673 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 1680 EXPECT_EQ(false, values[CHARACTERISTIC_KEY].length() < MAX_STRING_LEN); in HWTEST_F()
|
H A D | profile_cache_test.cpp | 448 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F() 520 for (int32_t i = 0; i < MAX_STRING_LEN + 5; i++) { in HWTEST_F()
|
/foundation/multimodalinput/input/util/common/include/ |
H A D | napi_constants.h | 72 inline constexpr size_t MAX_STRING_LEN { 1024 };
|
/foundation/multimodalinput/input/frameworks/napi/short_key/src/ |
H A D | js_short_key_context.cpp | 148 char businessId[MAX_STRING_LEN] = { 0 }; in SetKeyDownDuration() 150 CHKRP(napi_get_value_string_utf8(env, argv[0], businessId, MAX_STRING_LEN - 1, &ret), GET_VALUE_STRING_UTF8); in SetKeyDownDuration()
|
/foundation/multimodalinput/input/frameworks/napi/input_device/src/ |
H A D | js_input_device_context.cpp | 165 char eventType[MAX_STRING_LEN] = { 0 }; in On() 167 CHKRP(napi_get_value_string_utf8(env, argv[0], eventType, MAX_STRING_LEN - 1, &ret), GET_VALUE_STRING_UTF8); in On() 204 char eventType[MAX_STRING_LEN] = { 0 }; in Off() 206 CHKRP(napi_get_value_string_utf8(env, argv[0], eventType, MAX_STRING_LEN - 1, &ret), GET_VALUE_STRING_UTF8); in Off() 751 char keyName[MAX_STRING_LEN] = { 0 }; in ParseBMSArray()
|
H A D | js_util.cpp | 279 if (napi_get_value_string_utf8(env, value, result, MAX_STRING_LEN - 1, &len) != napi_ok) { in ParseString()
|
/foundation/multimodalinput/input/util/napi/src/ |
H A D | util_napi_value.cpp | 186 char tmpValue[MAX_STRING_LEN] = { 0 }; in GetNamePropertyString() 188 napi_get_value_string_utf8(env, napiValue, tmpValue, MAX_STRING_LEN - 1, &typeLen); in GetNamePropertyString()
|
/foundation/deviceprofile/device_info_manager/services/core/src/contentsensormanager/ |
H A D | switch_status_collector.cpp | 68 if (filePath.empty() || filePath.size() > MAX_STRING_LEN) { in LoadJsonFile()
|
/foundation/deviceprofile/device_info_manager/services/core/src/trustprofilemanager/ |
H A D | trust_profile_manager.cpp | 302 if (bundleName.size() > MAX_STRING_LEN) { in GetAccessControlProfile() 339 if (bundleName.size() > MAX_STRING_LEN || trustDeviceId.size() > MAX_STRING_LEN) { in GetAccessControlProfile() 377 if (trustDeviceId.size() > MAX_STRING_LEN) { in GetAccessControlProfileByTokenId() 414 if (accountId.size() > MAX_STRING_LEN) { in GetAccessControlProfile() 539 if (bundleName.size() > MAX_STRING_LEN) { in GetAccessControlProfile() 576 if (bundleName.size() > MAX_STRING_LEN || trustDeviceId.size() > MAX_STRING_LEN) { in GetAccessControlProfile() 1570 if (sql.empty() || sql.length() > MAX_STRING_LEN) { in GetResultSet()
|
/foundation/deviceprofile/device_info_manager/services/core/src/persistenceadapter/kvadapter/ |
H A D | kv_adapter.cpp | 104 if (key.empty() || key.size() > MAX_STRING_LEN || value.empty() || value.size() > MAX_STRING_LEN) { in Put()
|
/foundation/deviceprofile/device_info_manager/services/core/src/utils/ |
H A D | profile_cache.cpp | 434 if (caller.empty() || caller.size() > MAX_STRING_LEN || syncListener == nullptr) { in AddSyncListener() 487 if (caller.empty() || caller.size() > MAX_STRING_LEN) { in RemoveSyncListener()
|
/foundation/deviceprofile/device_info_manager/common/include/constants/ |
H A D | distributed_device_profile_constants.h | 113 constexpr int32_t MAX_STRING_LEN = 4096; member
|