1  /*
2  * Copyright (C) 2022 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 "storage.h"
17  
18  namespace OHOS {
19  namespace Media {
Storage()20  Storage::Storage()
21  {
22  }
23  
~Storage()24  Storage::~Storage()
25  {
26  }
27  
GetStorageID()28  uint32_t Storage::GetStorageID()
29  {
30      return storageID_;
31  }
32  
GetStorageType()33  uint16_t Storage::GetStorageType()
34  {
35      return storageType_;
36  }
37  
GetFilesystemType()38  uint16_t Storage::GetFilesystemType()
39  {
40      return fileSytemType_;
41  }
42  
GetAccessCapability()43  uint16_t Storage::GetAccessCapability()
44  {
45      return accessCapability_;
46  }
47  
GetMaxCapacity()48  uint64_t Storage::GetMaxCapacity()
49  {
50      return maxCapacity_;
51  }
52  
GetFreeSpaceInBytes()53  uint64_t Storage::GetFreeSpaceInBytes()
54  {
55      return freeSpaceInBytes_;
56  }
57  
GetFreeSpaceInObjects()58  uint32_t Storage::GetFreeSpaceInObjects()
59  {
60      return freeSpaceInObjects_;
61  }
62  
GetStorageDescription()63  std::string Storage::GetStorageDescription()
64  {
65      return storageDescription_;
66  }
67  
GetVolumeIdentifier()68  std::string Storage::GetVolumeIdentifier()
69  {
70      return volumeIdentifier_;
71  }
72  
SetStorageID(uint32_t storageID)73  void Storage::SetStorageID(uint32_t storageID)
74  {
75      storageID_ = storageID;
76  }
77  
SetStorageType(uint16_t storageType)78  void Storage::SetStorageType(uint16_t storageType)
79  {
80      storageType_ = storageType;
81  }
82  
SetFilesystemType(uint16_t fileSytemType)83  void Storage::SetFilesystemType(uint16_t fileSytemType)
84  {
85      fileSytemType_ = fileSytemType;
86  }
87  
SetAccessCapability(uint16_t accessCapability)88  void Storage::SetAccessCapability(uint16_t accessCapability)
89  {
90      accessCapability_ = accessCapability;
91  }
92  
SetMaxCapacity(uint64_t maxCapacity)93  void Storage::SetMaxCapacity(uint64_t maxCapacity)
94  {
95      maxCapacity_ = maxCapacity;
96  }
97  
SetFreeSpaceInBytes(uint64_t freeSpaceInBytes)98  void Storage::SetFreeSpaceInBytes(uint64_t freeSpaceInBytes)
99  {
100      freeSpaceInBytes_ = freeSpaceInBytes;
101  }
102  
SetFreeSpaceInObjects(uint32_t freeSpaceInObjects)103  void Storage::SetFreeSpaceInObjects(uint32_t freeSpaceInObjects)
104  {
105      freeSpaceInObjects_ = freeSpaceInObjects;
106  }
107  
SetStorageDescription(std::string storageDescription)108  void Storage::SetStorageDescription(std::string storageDescription)
109  {
110      storageDescription_ = storageDescription;
111  }
112  
SetVolumeIdentifier(std::string volumeIdentifier)113  void Storage::SetVolumeIdentifier(std::string volumeIdentifier)
114  {
115      volumeIdentifier_ = volumeIdentifier;
116  }
117  } // namespace Media
118  } // namespace OHOS