Refactored Mtp driver interface into multiple classes.
Added new interface for FunctionFS. This allows most of
the driver code to exist in userspace. The driver will
automatically use FunctionFS if it is enabled for that
device, otherwise it will default to the kernel driver.
The intention is to eventually deprecate the kernel driver.
Bug: 30976142
Change-Id: I36b8d16ca254fddd995b3ea1bd3d37b0ff4a28f7
Test: New automated tests for MtpFfsHandle, AsyncIO.
Manual testing on each device.
diff --git a/media/mtp/MtpEventPacket.h b/media/mtp/MtpEventPacket.h
index a8779fd..3f3b6a3 100644
--- a/media/mtp/MtpEventPacket.h
+++ b/media/mtp/MtpEventPacket.h
@@ -20,6 +20,8 @@
#include "MtpPacket.h"
#include "mtp.h"
+class IMtpHandle;
+
namespace android {
class MtpEventPacket : public MtpPacket {
@@ -29,8 +31,8 @@
virtual ~MtpEventPacket();
#ifdef MTP_DEVICE
- // write our data to the given file descriptor
- int write(int fd);
+ // write our data to the given usb handle
+ int write(IMtpHandle *h);
#endif
#ifdef MTP_HOST