1 /* 2 * Copyright (c) 2021 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 DFSU_MOUNT_ARGUMENT_DESCRIPTORS_H 17 #define DFSU_MOUNT_ARGUMENT_DESCRIPTORS_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace Storage { 23 namespace DistributedFile { 24 namespace Utils { 25 struct MountArgument final { 26 int userId_ { 0 }; 27 bool accountless_ { false }; 28 bool needInitDir_ { false }; 29 bool useCache_ { false }; 30 bool caseSensitive_ { false }; 31 bool enableMergeView_ { false }; 32 bool enableFixupOwnerShip_ { false }; 33 bool enableOfflineStash_ { true }; 34 bool externalFS_ { false }; 35 std::string relativePath_; 36 37 std::string GetFullSrc() const; 38 std::string GetFullDst() const; 39 std::string GetCtrlPath() const; 40 std::string GetCachePath() const; 41 std::string OptionsToString() const; 42 unsigned long GetFlags() const; 43 }; 44 45 class DfsuMountArgumentDescriptors final { 46 public: 47 static MountArgument Alpha(int userId, std::string relativePath); 48 }; 49 } // namespace Utils 50 } // namespace DistributedFile 51 } // namespace Storage 52 } // namespace OHOS 53 #endif // DFSU_MOUNT_ARGUMENT_DESCRIPTORS_H 54