Add getObjectPropValue function to MtpDevice.
In the MTP spec, the object size is stored in MtpObjectInfo as unsigned
32-bit integer and fetched by the getObjectInfo operation. For the
objects that are more than 4GB, the object size is provided as one of
extra properties, which are fetched by different operation.
The CL adds to getObjectPropValue method to MtpDevice class so that
client code can obtain 4GB+ object size from object property.
BUG=27805369
Change-Id: I0b91facd07cdc19866cb29f7df08bb1698bcf60b
diff --git a/media/mtp/MtpDevice.h b/media/mtp/MtpDevice.h
index ce60811..4be44cf 100644
--- a/media/mtp/MtpDevice.h
+++ b/media/mtp/MtpDevice.h
@@ -107,6 +107,9 @@
MtpProperty* getDevicePropDesc(MtpDeviceProperty code);
MtpProperty* getObjectPropDesc(MtpObjectProperty code, MtpObjectFormat format);
+ // Reads value of |property| for |handle|. Returns true on success.
+ bool getObjectPropValue(MtpObjectHandle handle, MtpProperty* property);
+
bool readObject(MtpObjectHandle handle, ReadObjectCallback callback,
uint32_t objectSize, void* clientData);
bool readObject(MtpObjectHandle handle, const char* destPath, int group,