1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef USER_ACCESS_COMMON_UTILS_H
17#define USER_ACCESS_COMMON_UTILS_H
18
19#include "os_account_manager.h"
20#include "parameter.h"
21
22namespace OHOS {
23namespace FileAccessFwk {
24const std::string FULL_MOUNT_ENABLE_PARAMETER = "const.filemanager.full_mount.enable";
25
26static bool IsFullMountEnable()
27{
28    char value[] = "false";
29    int ret = GetParameter(FULL_MOUNT_ENABLE_PARAMETER.c_str(), "false", value, sizeof(value));
30    if ((ret > 0) && (std::string(value) == "true")) {
31        HILOG_INFO("Supporting all mounts");
32        return true;
33    }
34    HILOG_INFO("Not supporting all mounts");
35    return false;
36}
37
38static bool GetUserName(std::string &userName)
39{
40    userName = "currentUser";
41    return true;
42}
43
44} // FileAccessFwk
45} // OHOS
46#endif //USER_ACCESS_COMMON_UTILS_H