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

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_daemon_client.h

Issue 982283002: Implement DeleteFile and DeleteDirectory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failed test case. 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 c44ba755db58b3942925ee6d8857e117ad61903d..ae5e8c01a93b23e82bd84a242a22094aecc68812 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
+++ b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
@@ -71,6 +71,9 @@ class MediaTransferProtocolDaemonClient {
// A callback to handle the result of CopyFileFromLocal.
typedef base::Closure CopyFileFromLocalCallback;
+ // A callback to handle the result of DeleteObject.
+ typedef base::Closure DeleteObjectCallback;
+
// A callback to handle storage attach/detach events.
// The first argument is true for attach, false for detach.
// The second argument is the storage name.
@@ -152,6 +155,14 @@ class MediaTransferProtocolDaemonClient {
const CopyFileFromLocalCallback& callback,
const ErrorCallback& error_callback) = 0;
+ // Calls DeleteObject method. |callback| is called after the method call
+ // succeeds, otherwise, |error_callback| is called.
+ // |object_id| is an object id of a file or directory which is deleted.
+ virtual void DeleteObject(const std::string& handle,
+ const uint32 object_id,
+ const DeleteObjectCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Registers given callback for events. Should only be called once.
// |storage_event_handler| is called when a mtp storage attach or detach
// signal is received.

Powered by Google App Engine
This is Rietveld 408576698