diff options
author | Mike Lockwood <lockwood@android.com> | 2010-12-30 15:38:45 -0500 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-01-22 15:56:09 -0800 |
commit | 23f1b33c5f88f07510ca5dc01b3afd7af6843d6c (patch) | |
tree | 801bb79c1b94e88d649a4066b631290e3de19ae9 /media/mtp/MtpDevice.h | |
parent | f0cf63fff696b30a0b5760bb637efb1aa9bf1f55 (diff) | |
download | frameworks_av-23f1b33c5f88f07510ca5dc01b3afd7af6843d6c.zip frameworks_av-23f1b33c5f88f07510ca5dc01b3afd7af6843d6c.tar.gz frameworks_av-23f1b33c5f88f07510ca5dc01b3afd7af6843d6c.tar.bz2 |
New APIs for MTP and PTP host support
This replaces the previous ContentProvider based interface
Change-Id: I4cea2544854adb9fdcc04345e4d73d8ef05380f3
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpDevice.h')
-rw-r--r-- | media/mtp/MtpDevice.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/media/mtp/MtpDevice.h b/media/mtp/MtpDevice.h index d0a0fb3..b69203e 100644 --- a/media/mtp/MtpDevice.h +++ b/media/mtp/MtpDevice.h @@ -45,9 +45,6 @@ private: MtpDeviceInfo* mDeviceInfo; MtpPropertyList mDeviceProperties; - // a unique ID for the device - int mID; - // current session ID MtpSessionID mSessionID; // current transaction ID @@ -67,9 +64,10 @@ public: const struct usb_endpoint_descriptor *ep_in, const struct usb_endpoint_descriptor *ep_out, const struct usb_endpoint_descriptor *ep_intr); - virtual ~MtpDevice(); - inline int getID() const { return mID; } + static MtpDevice* open(const char* deviceName, int fd); + + virtual ~MtpDevice(); void initialize(); void close(); @@ -97,7 +95,11 @@ public: MtpProperty* getDevicePropDesc(MtpDeviceProperty code); MtpProperty* getObjectPropDesc(MtpObjectProperty code, MtpObjectFormat format); - bool readObject(MtpObjectHandle handle, const char* destPath, int group, + bool readObject(MtpObjectHandle handle, + bool (* callback)(void* data, int offset, + int length, void* clientData), + int objectSize, void* clientData); + bool readObject(MtpObjectHandle handle, const char* destPath, int group, int perm); private: |