diff options
| author | 2011-04-21 17:05:55 -0700 | |
|---|---|---|
| committer | 2011-05-04 10:41:20 -0400 | |
| commit | fdb50e6f8eaac31010b64fc79a60dacb5f776613 (patch) | |
| tree | 1ceebb39efa006a324770eef30283e6c4a422899 /media/mtp/MtpDebug.cpp | |
| parent | fb6232635d339c83ca100e472b159f103dafb6e2 (diff) | |
DO NOT MERGE MTP: Add extended operations to support in-place editing of files
MTP does not support partial writes of files (the entire file must be transferred at once).
This makes it impossible to implement a FUSE file system for MTP
with acceptable performance.
To fix this problem, this change adds extended MTP operations to allow
partial writes to files:
SendPartialObject - allows writing a subset of a file, or appending to the end of a file
TruncateObject - allows changing the size of a file
BeginEditObject - must be called before using SendPartialObject and TruncateObject
EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject
We also add GetPartialObject64, which is the same as GetPartialObject
but has a 64 bit offset rather than 32.
Change-Id: I000930b787b00a2da0b57de9790053b2d71b86fd
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpDebug.cpp')
| -rw-r--r-- | media/mtp/MtpDebug.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/mtp/MtpDebug.cpp b/media/mtp/MtpDebug.cpp index 1668ecf258f8..9f3037df4d68 100644 --- a/media/mtp/MtpDebug.cpp +++ b/media/mtp/MtpDebug.cpp @@ -63,6 +63,12 @@ static const CodeEntry sOperationCodes[] = { { "MTP_OPERATION_GET_OBJECT_REFERENCES", 0x9810 }, { "MTP_OPERATION_SET_OBJECT_REFERENCES", 0x9811 }, { "MTP_OPERATION_SKIP", 0x9820 }, + // android extensions + { "MTP_OPERATION_GET_PARTIAL_OBJECT_64", 0x95C1 }, + { "MTP_OPERATION_SEND_PARTIAL_OBJECT", 0x95C2 }, + { "MTP_OPERATION_TRUNCATE_OBJECT", 0x95C3 }, + { "MTP_OPERATION_BEGIN_EDIT_OBJECT", 0x95C4 }, + { "MTP_OPERATION_END_EDIT_OBJECT", 0x95C5 }, { 0, 0 }, }; |