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 #ifndef FRAMEWORKS_SERVICES_MEDIA_MTP_INCLUDE_STORAGE_H_ 17 #define FRAMEWORKS_SERVICES_MEDIA_MTP_INCLUDE_STORAGE_H_ 18 #include <string> 19 namespace OHOS { 20 namespace Media { 21 class Storage { 22 public: 23 Storage(); 24 ~Storage(); 25 uint32_t GetStorageID(); 26 uint16_t GetStorageType(); 27 uint16_t GetFilesystemType(); 28 uint16_t GetAccessCapability(); 29 uint64_t GetMaxCapacity(); 30 uint64_t GetFreeSpaceInBytes(); 31 uint32_t GetFreeSpaceInObjects(); 32 std::string GetStorageDescription(); 33 std::string GetVolumeIdentifier(); 34 35 void SetStorageID(uint32_t storageID); 36 void SetStorageType(uint16_t storageType); 37 void SetFilesystemType(uint16_t fileSytemType); 38 void SetAccessCapability(uint16_t accessCapability); 39 void SetMaxCapacity(uint64_t maxCapacity); 40 void SetFreeSpaceInBytes(uint64_t freeSpaceInBytes); 41 void SetFreeSpaceInObjects(uint32_t freeSpaceInObjects); 42 void SetStorageDescription(std::string storageDescription); 43 void SetVolumeIdentifier(std::string volumeIdentifier); 44 45 private: 46 uint32_t storageID_ {0}; 47 uint16_t storageType_ {0}; 48 uint16_t fileSytemType_ {0}; 49 uint16_t accessCapability_ {0}; 50 uint64_t maxCapacity_ {0}; 51 uint64_t freeSpaceInBytes_ {0}; 52 uint32_t freeSpaceInObjects_ {0}; 53 std::string storageDescription_; 54 std::string volumeIdentifier_; 55 }; 56 } // namespace Media 57 } // namespace OHOS 58 #endif // FRAMEWORKS_SERVICES_MEDIA_MTP_INCLUDE_STORAGE_H_ 59