• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "mountpoint/mount_point.h"
17 
18 #include "utils_directory.h"
19 #include "utils_log.h"
20 
21 namespace OHOS {
22 namespace Storage {
23 namespace DistributedFile {
24 using namespace std;
25 
26 atomic<uint32_t> MountPoint::idGen_;
27 
MountPoint(const Utils::MountArgument & mountArg)28 MountPoint::MountPoint(const Utils::MountArgument &mountArg) : mountArg_(mountArg)
29 {
30     id_ = idGen_++;
31 }
32 
Mount() const33 void MountPoint::Mount() const
34 {
35     LOGI("mount");
36 }
37 
Umount() const38 void MountPoint::Umount() const
39 {
40     LOGE("umount");
41 }
42 
operator ==(const MountPoint & rop) const43 bool MountPoint::operator==(const MountPoint &rop) const
44 {
45     return mountArg_.GetFullDst() == rop.mountArg_.GetFullDst();
46 }
47 
GetMountArgument() const48 Utils::MountArgument MountPoint::GetMountArgument() const
49 {
50     return mountArg_;
51 }
52 
ToString() const53 string MountPoint::ToString() const
54 {
55     return "";
56 }
57 } // namespace DistributedFile
58 } // namespace Storage
59 } // namespace OHOS
60