MtpStorageInfo.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (C) 2010 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef _MTP_STORAGE_INFO_H
  17. #define _MTP_STORAGE_INFO_H
  18. #include "MtpTypes.h"
  19. namespace android {
  20. class MtpDataPacket;
  21. class MtpStorageInfo {
  22. public:
  23. MtpStorageID mStorageID;
  24. uint16_t mStorageType;
  25. uint16_t mFileSystemType;
  26. uint16_t mAccessCapability;
  27. uint64_t mMaxCapacity;
  28. uint64_t mFreeSpaceBytes;
  29. uint32_t mFreeSpaceObjects;
  30. char* mStorageDescription;
  31. char* mVolumeIdentifier;
  32. public:
  33. explicit MtpStorageInfo(MtpStorageID id);
  34. virtual ~MtpStorageInfo();
  35. bool read(MtpDataPacket& packet);
  36. void print();
  37. };
  38. }; // namespace android
  39. #endif // _MTP_STORAGE_INFO_H