From a6c490b8b2d96ebaab632286029463f932ae3b6b Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Sat, 5 Jun 2010 22:45:01 -0400 Subject: MTP: host support for retrieving device property descriptors Signed-off-by: Mike Lockwood --- media/mtp/MtpTypes.h | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'media/mtp/MtpTypes.h') diff --git a/media/mtp/MtpTypes.h b/media/mtp/MtpTypes.h index e3389c0..6a33a2b 100644 --- a/media/mtp/MtpTypes.h +++ b/media/mtp/MtpTypes.h @@ -23,20 +23,39 @@ namespace android { +typedef int32_t int128_t[4]; +typedef uint32_t uint128_t[4]; + typedef uint16_t MtpOperationCode; typedef uint16_t MtpResponseCode; typedef uint32_t MtpSessionID; typedef uint32_t MtpStorageID; typedef uint32_t MtpTransactionID; -typedef uint16_t MtpDeviceProperty; +typedef uint16_t MtpPropertyCode; +typedef uint16_t MtpDataType; typedef uint16_t MtpObjectFormat; -typedef uint16_t MtpObjectProperty; +typedef MtpPropertyCode MtpDeviceProperty; +typedef MtpPropertyCode MtpObjectProperty; // object handles are unique across all storage but only within a single session. // object handles cannot be reused after an object is deleted. // values 0x00000000 and 0xFFFFFFFF are reserved for special purposes. typedef uint32_t MtpObjectHandle; +typedef union MtpPropertyValue { + int8_t i8; + uint8_t u8; + int16_t i16; + uint16_t u16; + int32_t i32; + uint32_t u32; + int64_t i64; + uint64_t u64; + int128_t i128; + uint128_t u128; + char* str; +}; + // Special values #define MTP_PARENT_ROOT 0xFFFFFFFF // parent is root of the storage #define kInvalidObjectHandle 0xFFFFFFFF @@ -53,16 +72,18 @@ typedef uint32_t MtpObjectHandle; class MtpStorage; class MtpDevice; +class MtpProperty; typedef Vector MtpStorageList; typedef Vector MtpDeviceList; +typedef Vector MtpPropertyList; typedef Vector UInt8List; -typedef Vector UInt16List; +typedef Vector UInt16List; typedef Vector UInt32List; typedef Vector UInt64List; typedef Vector Int8List; -typedef Vector Int16List; +typedef Vector Int16List; typedef Vector Int32List; typedef Vector Int64List; -- cgit v1.1