MtpObjectInfo.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_OBJECT_INFO_H
  17. #define _MTP_OBJECT_INFO_H
  18. #include "MtpTypes.h"
  19. namespace android {
  20. class MtpDataPacket;
  21. class MtpObjectInfo {
  22. public:
  23. MtpObjectHandle mHandle;
  24. MtpStorageID mStorageID;
  25. MtpObjectFormat mFormat;
  26. uint16_t mProtectionStatus;
  27. uint32_t mCompressedSize;
  28. MtpObjectFormat mThumbFormat;
  29. uint32_t mThumbCompressedSize;
  30. uint32_t mThumbPixWidth;
  31. uint32_t mThumbPixHeight;
  32. uint32_t mImagePixWidth;
  33. uint32_t mImagePixHeight;
  34. uint32_t mImagePixDepth;
  35. MtpObjectHandle mParent;
  36. uint16_t mAssociationType;
  37. uint32_t mAssociationDesc;
  38. uint32_t mSequenceNumber;
  39. char* mName;
  40. time_t mDateCreated;
  41. time_t mDateModified;
  42. char* mKeywords;
  43. public:
  44. explicit MtpObjectInfo(MtpObjectHandle handle);
  45. virtual ~MtpObjectInfo();
  46. bool read(MtpDataPacket& packet);
  47. void print();
  48. };
  49. }; // namespace android
  50. #endif // _MTP_OBJECT_INFO_H