Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_manager.h

Issue 1007173003: Implement MoveFileLocal (with rename operation). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1915ce205cf5a3657feb2ece66c6316b3a049f14..724fe86e4be81ce8a415f84d94e7a82ce9de34b0 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_manager.h
+++ b/device/media_transfer_protocol/media_transfer_protocol_manager.h
@@ -59,6 +59,10 @@ class MediaTransferProtocolManager {
typedef base::Callback<void(const MtpFileEntry& file_entry,
bool error)> GetFileInfoCallback;
+ // A callback to handle the result of RenameObject.
+ // The first argument is true if there was an error.
+ typedef base::Callback<void(bool error)> RenameObjectCallback;
+
// A callback to handle the result of CopyFileFromLocal.
// The first argument is true if there was an error.
typedef base::Callback<void(bool error)> CopyFileFromLocalCallback;
@@ -124,6 +128,12 @@ class MediaTransferProtocolManager {
uint32 file_id,
const GetFileInfoCallback& callback) = 0;
+ // Renames |object_id| to |new_name|.
+ virtual void RenameObject(const std::string& storage_handle,
+ const uint32 object_id,
+ const std::string& new_name,
+ const RenameObjectCallback& callback) = 0;
+
// Copies the file from |source_file_descriptor| to |file_name| on
// |parent_id|.
virtual void CopyFileFromLocal(const std::string& storage_handle,

Powered by Google App Engine
This is Rietveld 408576698