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

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_daemon_client.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_daemon_client.h
diff --git a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
index ae5e8c01a93b23e82bd84a242a22094aecc68812..12436d3d81e593ad09a08e7ce1870c81f4f0becb 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
+++ b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
@@ -68,6 +68,9 @@ class MediaTransferProtocolDaemonClient {
// The argument is a string containing the file data.
typedef base::Callback<void(const std::string& data)> ReadFileCallback;
+ // A callback to handle the result of RenameObject.
+ typedef base::Closure RenameObjectCallback;
+
// A callback to handle the result of CopyFileFromLocal.
typedef base::Closure CopyFileFromLocalCallback;
@@ -143,6 +146,16 @@ class MediaTransferProtocolDaemonClient {
const ReadFileCallback& callback,
const ErrorCallback& error_callback) = 0;
+ // Calls RenameObject method. |callback| is called after the method call
+ // succeeds, otherwise, |error_callback| is called.
+ // |object_is| is an id of object to be renamed.
+ // |new_name| is new name of the object.
+ virtual void RenameObject(const std::string& handle,
+ const uint32 object_id,
+ const std::string& new_name,
+ const RenameObjectCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Calls CopyFileFromLocal method. |callback| is called after the method call
// succeeds, otherwise, |error_callback| is called.
// |source_file_descriptor| is a file descriptor of source file.

Powered by Google App Engine
This is Rietveld 408576698