From 4714b0766ecf48f09f39b4781a5c4deafc092d49 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 12 Jul 2010 08:49:01 -0400 Subject: Integrate host to device file transfer with the media provider. 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 --- media/mtp/MtpServer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'media/mtp/MtpServer.h') diff --git a/media/mtp/MtpServer.h b/media/mtp/MtpServer.h index afba846..37b1cbe 100644 --- a/media/mtp/MtpServer.h +++ b/media/mtp/MtpServer.h @@ -60,6 +60,7 @@ private: // handle for new object, set by SendObjectInfo and used by SendObject MtpObjectHandle mSendObjectHandle; + MtpObjectFormat mSendObjectFormat; MtpString mSendObjectFilePath; size_t mSendObjectFileSize; -- cgit v1.1