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