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

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_manager.h

Issue 947943002: Implement CopyFileFromLocal of MTPDeviceAsyncDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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 7ff89e9f92286e0cee46670606a40063d88cb1d1..39eea9bb899307fc36b91c850bbdc74e9a1d9a38 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 CopyFileFromLocal.
+ // The first argument is true if there was an error.
+ typedef base::Callback<void(bool error)> CopyFileFromLocalCallback;
+
// Implement this interface to be notified about MTP storage
// attachment / detachment events.
class Observer {
@@ -115,6 +119,14 @@ class MediaTransferProtocolManager {
uint32 file_id,
const GetFileInfoCallback& callback) = 0;
+ // Copies the file from |source_file_descriptor| to |file_name| on
+ // |parent_id|.
+ virtual void CopyFileFromLocal(const std::string& storage_handle,
+ const int source_file_descriptor,
+ const uint32 parent_id,
+ const std::string& file_name,
+ const CopyFileFromLocalCallback& callback) = 0;
+
// Creates and returns the global MediaTransferProtocolManager instance.
// On Linux, |task_runner| specifies the task runner to process asynchronous
// operations.

Powered by Google App Engine
This is Rietveld 408576698