| Index: device/media_transfer_protocol/media_transfer_protocol_manager.h
|
| diff --git a/device/media_transfer_protocol/media_transfer_protocol_manager.h b/device/media_transfer_protocol/media_transfer_protocol_manager.h
|
| index 39eea9bb899307fc36b91c850bbdc74e9a1d9a38..ebeb12ed7d085721306ab761b1282a58e4ce4884 100644
|
| --- a/device/media_transfer_protocol/media_transfer_protocol_manager.h
|
| +++ b/device/media_transfer_protocol/media_transfer_protocol_manager.h
|
| @@ -47,6 +47,12 @@ class MediaTransferProtocolManager {
|
| bool has_more,
|
| bool error)> ReadDirectoryCallback;
|
|
|
| + // A callback to handle the result of ReadDirectoryEntryIds.
|
| + // The first argument is a vector of file ids.
|
| + // The second argument is true if there was an error.
|
| + typedef base::Callback<void(const std::vector<uint32>& file_ids, bool error)>
|
| + ReadDirectoryEntryIdsCallback;
|
| +
|
| // A callback to handle the result of ReadFileChunk.
|
| // The first argument is a string containing the file data.
|
| // The second argument is true if there was an error.
|
| @@ -63,6 +69,10 @@ class MediaTransferProtocolManager {
|
| // The first argument is true if there was an error.
|
| typedef base::Callback<void(bool error)> CopyFileFromLocalCallback;
|
|
|
| + // A callback to handle the result of DeleteObject.
|
| + // The first argument is true if there was an error.
|
| + typedef base::Callback<void(bool error)> DeleteObjectCallback;
|
| +
|
| // Implement this interface to be notified about MTP storage
|
| // attachment / detachment events.
|
| class Observer {
|
| @@ -105,6 +115,13 @@ class MediaTransferProtocolManager {
|
| uint32 file_id,
|
| const ReadDirectoryCallback& callback) = 0;
|
|
|
| + // Reads directory entry ids from |file_id| on |storage_handle| and runs
|
| + // |callback|.
|
| + virtual void ReadDirectoryEntryIds(
|
| + const std::string& storage_handle,
|
| + const uint32 file_id,
|
| + const ReadDirectoryEntryIdsCallback& callback) = 0;
|
| +
|
| // Reads file data from |file_id| on |storage_handle| and runs |callback|.
|
| // Reads |count| bytes of data starting at |offset|.
|
| virtual void ReadFileChunk(const std::string& storage_handle,
|
| @@ -127,6 +144,11 @@ class MediaTransferProtocolManager {
|
| const std::string& file_name,
|
| const CopyFileFromLocalCallback& callback) = 0;
|
|
|
| + // Deletes |object_id|.
|
| + virtual void DeleteObject(const std::string& storage_handle,
|
| + const uint32 object_id,
|
| + const DeleteObjectCallback& callback) = 0;
|
| +
|
| // Creates and returns the global MediaTransferProtocolManager instance.
|
| // On Linux, |task_runner| specifies the task runner to process asynchronous
|
| // operations.
|
|
|