From 0cf89f2e622aa53f31fa5762ca4bc805bb509ed3 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 26 Jul 2010 20:40:45 -0400 Subject: MTP host: Add support for reading files from an MTP device via ParcelFileDescriptor Also added some support for sending files to the device that hasn't been debugged yet. Add locking to MtpDevice to prevent it from attempting multiple transactions simultaneously. Change-Id: I2b995ba0af086cc6920bd6b8c869f540ad78560a Signed-off-by: Mike Lockwood --- media/mtp/MtpDataPacket.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'media/mtp/MtpDataPacket.h') diff --git a/media/mtp/MtpDataPacket.h b/media/mtp/MtpDataPacket.h index 9a24d61..e8314d7 100644 --- a/media/mtp/MtpDataPacket.h +++ b/media/mtp/MtpDataPacket.h @@ -98,7 +98,12 @@ public: #ifdef MTP_HOST int read(struct usb_endpoint *ep); + int readData(struct usb_endpoint *ep, void* buffer, int length); + int readDataHeader(struct usb_endpoint *ep); + + int writeDataHeader(struct usb_endpoint *ep, uint32_t length); int write(struct usb_endpoint *ep); + int write(struct usb_endpoint *ep, void* buffer, uint32_t length); #endif inline bool hasData() const { return mPacketSize > MTP_CONTAINER_HEADER_SIZE; } -- cgit v1.1