summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpServer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* MTP: Implement support for getting/setting device propertiesMike Lockwood2010-09-021-1/+4
| | | | | | | | Added support for the "device friendly name" and "synchonization partner" properties, which are required by Microsoft. Change-Id: Ic0443333d75f7d98a2d902a790b9d505a56d4eef Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Send an Intent after an MTP session that resulted in media database ↵Mike Lockwood2010-08-311-0/+7
| | | | | | | modifications Change-Id: Ib2796e9155350c67769502935a73cf98d6ae9c08 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: work in progress on expanded property supportMike Lockwood2010-08-251-41/+77
| | | | | | | | 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: Fix wrong delete operator from previous change.Mike Lockwood2010-08-101-1/+1
| | | | | Change-Id: I64e8fdc610495f21060727b6bed42d1584833405 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Push queries for supported formats and properties up to Java.Mike Lockwood2010-08-101-46/+14
| | | | | Change-Id: I4f117090340e3916afda3d194521a6092a672ddc Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix some typosMike Lockwood2010-08-091-1/+1
| | | | | Change-Id: Ib31708c3a925e3c0ab8eea6922ab09e02b740936 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for syncing MTP playlistsMike Lockwood2010-08-031-7/+38
| | | | | | | | 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-5/+28
| | | | | Change-Id: Iccc3a445f9a1eab7bb76eddd567c6a3a8f155b2b Signed-off-by: Mike Lockwood <lockwood@android.com>
* Clean up MtpDatabase API.Mike Lockwood2010-08-021-19/+17
| | | | | | | | 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>
* MTP: Only send events to host if we have an open session.Mike Lockwood2010-07-191-12/+16
| | | | | Change-Id: I7b2d0c88c2d2ae0490247703d0fb1b862154db92 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove our copy of the f_mtp.h kernel header, now that it is in bionic.Mike Lockwood2010-07-151-1/+1
| | | | | Change-Id: I2b5e72bf25b3525ace4b919c6e8b6bd6750f6dfa Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for sending events to the host when objects are added and ↵Mike Lockwood2010-07-131-1/+25
| | | | | | | removed Change-Id: Ia1d5232b919c644c670ff9ca651eca92b3f9ad42 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Integrate host to device file transfer with the media provider.Mike Lockwood2010-07-121-11/+23
| | | | | | | | | | | | | | | | | | | | | 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-8/+1
| | | | | Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use media provider database to implement MTP device support.Mike Lockwood2010-07-081-9/+8
| | | | | | | | | | | | | Uses a new "MTP objects" table in the media provider to support basic enumeration of the external storage file system. Support for accessing audio, video and image metadata in the existing media provider tables will be added in a later commit. The C++ MtpDatabase class is now abstract, to support a proxy subclass that calls through JNI to the Java MtpDatabase class in the media provider. Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: remove separate audio table from prototype MTP databaseMike Lockwood2010-07-081-3/+0
| | | | | Change-Id: I5e4b49b741a0a3c6ddf5afcbb20a0d7c9515c8ce Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix ownership and file permissions for transferred files and foldersMike Lockwood2010-07-021-2/+14
| | | | | | | | All new files and folders are created with group sdcard_rw Permissions for new files are 0664 and directories 0775 Change-Id: I6d508231150f687e2e529112fd47f10e30fa594f Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Make MtpDatabase class abstract so we can have multiple implementationsMike Lockwood2010-07-021-2/+2
| | | | | | | | 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>
* MTP: Implement GetObjectPropDescMike Lockwood2010-06-301-11/+40
| | | | | Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: replace printfs with logcatMike Lockwood2010-06-301-16/+20
| | | | | Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use a fd instead of a file path in file transfer ioctls.Mike Lockwood2010-06-221-6/+13
| | | | | | | | This restricts the driver to the client's permissions when copying files to avoid potential security problems. Change-Id: I9b3151168d334fe4374875804d4ba82bef44db3b Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP device: Read manufacturer name and serial number from system properties.Mike Lockwood2010-06-141-2/+9
| | | | | Change-Id: I8d1ad79f38aaaa50fa8899e6b614096af95fdf39 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for host cancellation of file transfers.Mike Lockwood2010-06-041-21/+51
| | | | | Change-Id: I72df423f8017286e41adae525e6fbcb6b8440687 Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP host: Implement getObjectHandles and getObjectInfo commandsMike Lockwood2010-05-191-1/+1
| | | | | Change-Id: I3ff6e52237f400b4e50c534a1f964c80789bfe98 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: More prototyping work:Mike Lockwood2010-05-181-8/+38
| | | | | | | | | | 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/+516
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>