summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDatabase.h
Commit message (Collapse)AuthorAgeFilesLines
* MTP: Implement GetThumb commandMike Lockwood2011-04-251-0/+2
| | | | | | | | | This allows the PC to access thumbnails in JPEG files over MTP/PTP Bug: 3219495 Change-Id: I4964f8b4826dffb7f0f77464ec91bd2e97a2f007 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add extended operations to support in-place editing of filesMike Lockwood2011-04-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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: I4b110748b97ae05cdc8aab02ecdbbbeb263f7840 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix problems with modification dates for folders and non-media filesMike Lockwood2011-01-181-1/+0
| | | | | | | | | Also removed an unnecessary parameter to MtpDatabase.endSendobject() BUG: 3352142 Change-Id: I6fd812dcba4814956bc8bc1cbd6bd5c868197790 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Improve argument checking in SendObjectInfoMike Lockwood2010-12-081-2/+3
| | | | | | | | In particular, make sure the parent is a folder and make sure file does not already exist. Change-Id: Ifa870faba3285f03a92025d9e82f93fed78a761c Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for multiple properties in GetObjectPropList commandMike Lockwood2010-12-021-2/+1
| | | | | Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fixes to allow file transfers > 4 gigabytesMike Lockwood2010-11-171-0/+1
| | | | | | | BUG: 3198248 Change-Id: I6f11c79a19d7bdd63718a7370939124b1262d221 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Partial implementation of the GetObjectPropList commandMike Lockwood2010-11-151-0/+6
| | | | | | | | | | In this initial implementation we only support fetching one property at a time. Support depth = 0 (single object) or depth = 1 (all objects in a directory) Reimplemented GetObjectPropValue on top of GetObjectPropList, since the former is a special case of the latter. Change-Id: Ia76ee61741d6ee3902b5c5d9fc094cf86dfaf650 Signed-off-by: Mike Lockwood <lockwood@google.com>
* MTP: Send an Intent after an MTP session that resulted in media database ↵Mike Lockwood2010-08-311-0/+4
| | | | | | | modifications Change-Id: Ib2796e9155350c67769502935a73cf98d6ae9c08 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: work in progress on expanded property supportMike Lockwood2010-08-251-1/+18
| | | | | | | | GetObjectPropValue and SetObjectPropValue are disabled until I figure out why Windows doesn't like what I have done. Change-Id: I74e945ef3ea031f6d46f4ebaa8df815da0a5c3ed Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Push queries for supported formats and properties up to Java.Mike Lockwood2010-08-101-0/+7
| | | | | Change-Id: I4f117090340e3916afda3d194521a6092a672ddc Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for syncing MTP playlistsMike Lockwood2010-08-031-0/+7
| | | | | | | | MTP playlists now correspond to playlists in the media provider (like those created by the Music app). Change-Id: I085cb3cff003037ad62f0e297fb0cfd3047cb3a2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Implement GetNumObjectsMike Lockwood2010-08-021-0/+4
| | | | | Change-Id: Iccc3a445f9a1eab7bb76eddd567c6a3a8f155b2b Signed-off-by: Mike Lockwood <lockwood@android.com>
* Clean up MtpDatabase API.Mike Lockwood2010-08-021-6/+2
| | | | | | | | Return MTP response codes instead of booleans for success or failure. Remove some unused code. Change-Id: I82ce80a4d7779233264e3caf139ebd0cece12f5c Signed-off-by: Mike Lockwood <lockwood@android.com>
* Integrate host to device file transfer with the media provider.Mike Lockwood2010-07-121-3/+12
| | | | | | | | | | | | | | | | | | | | | MTP file transfers happen in two stages. The SendObjectInfo command sends some information about the file and reserves an ObjectHandle for the new file. The file transfer is then performed using the SendObject command. To support this in the media provider, MtpDatabase.beginSendObject receives the information from SendObjectInfo and creates an row for it in the MTP objects table for the new file. After the file transfer has completed, then MtpDatabase.endSendObject is called. In endSendObject, we run the media scanner on the new file, which will add a row to the images, audio, video or audio playlist table. To avoid the media scanner creating a second row for the file in the MTP objects table, we pass the ObjectHandle created in beginSendObject to the media scanner, which then passes it to the media provider via the content values when it performs its insert. Change-Id: I1ebcc63d6bd4404b0d3a93c703a9d3c097381d3a Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove some scafolding and test code that is no longer worth maintaining.Mike Lockwood2010-07-091-5/+0
| | | | | Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: remove separate audio table from prototype MTP databaseMike Lockwood2010-07-081-17/+1
| | | | | Change-Id: I5e4b49b741a0a3c6ddf5afcbb20a0d7c9515c8ce Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Make MtpDatabase class abstract so we can have multiple implementationsMike Lockwood2010-07-021-51/+43
| | | | | | | | Rename existing test database to MtpSqliteDatabase This is the first step in transitioning to using the media provider database Change-Id: I5f36c854c6e76a79137c267b000a52ced803776c Signed-off-by: Mike Lockwood <lockwood@android.com>
* More work on PTP host support.Mike Lockwood2010-05-191-2/+1
| | | | | Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d Signed-off-by: Mike Lockwood <mike@spruce.(none)>
* MTP: More prototyping work:Mike Lockwood2010-05-181-1/+22
| | | | | | | | | | New media scanner test program Media scanner now cleans up after files that no longer exist Separate database table for audio files Extract metadata from audio files with libstagefright Change-Id: I2bd0fe877836c741658e72fcfeb89c11be0d9b41 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Move MTP code to the android namespaceMike Lockwood2010-05-141-0/+4
| | | | | Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d Signed-off-by: Mike Lockwood <lockwood@android.com>
* Checkpoint work on MTP and PTP investigation.Mike Lockwood2010-05-131-0/+65
This change includes work in progress on a C++ library for both host and device MTP and PTP support. Currently the makefile builds two test programs: mtptest - a command line test program that implements a small subset of device side MTP. Requires a kernel driver that has not been checked in yet. ptptest - a host tool to test USB host support for detecting and communicating with digital cameras over PTP. Runs on Linux host. Later this will be reformulated as a native library that will be used in the media process. Change-Id: I81aab279975b600b59d99013ab97f9adf0b58da7 Signed-off-by: Mike Lockwood <lockwood@android.com>