设备上线常量

Change-Id: I268d47c4c0a84e3dedf4f1d099fe46b3b9ff19af
Signed-off-by: zhangxiaoliang25 <zhangxiaoliang25@huawei.com>
This commit is contained in:
zhangxiaoliang25 2023-12-11 03:34:15 +00:00
parent 9fdee6046b
commit 3937766d60
3 changed files with 5 additions and 5 deletions

View File

@ -225,9 +225,9 @@ void InitNotifyType(napi_env env, napi_value exports)
void InitDeviceUri(napi_env env, napi_value exports)
{
napi_value deviceUri = nullptr;
napi_create_string_utf8(env, DEVICE_URI.c_str(), DEVICE_URI.length(), &deviceUri);
napi_set_named_property(env, exports, "DEVICE_URI", deviceUri);
napi_value devicesUri = nullptr;
napi_create_string_utf8(env, DEVICES_URI.c_str(), DEVICES_URI.length(), &devicesUri);
napi_set_named_property(env, exports, "DEVICES_URI", devicesUri);
}
void InitDeviceRoots(napi_env env, napi_value exports)

View File

@ -85,7 +85,7 @@ constexpr int32_t DEVICE_ONLINE = 5;
constexpr int32_t DEVICE_OFFLINE = 6;
//Indicates the device root uris
const std::string DEVICE_URI = "file://docs";
const std::string DEVICES_URI = "file://docs";
//Indicates the root uri of the External device.
const std::string EXTERNAL_ROOT_URI = "file://docs/storage/External";

View File

@ -1185,7 +1185,7 @@ int FileAccessHelper::StopWatcher(Uri &uri, bool isUnregisterAll)
static void convertUris(Uri uri, std::vector<Uri> &uris) {
std::string uriString = uri.ToString();
if (uriString == DEVICE_URI) {
if (uriString == DEVICES_URI) {
uris = deviceUris;
} else {
uris.push_back(uri);