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

Unified Diff: chromeos/dbus/media_transfer_protocol_daemon_client.h

Issue 10868038: chromeos: Add GetFileInfo methods for MTPDClient. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chromeos/dbus/media_transfer_protocol_daemon_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/media_transfer_protocol_daemon_client.h
===================================================================
--- chromeos/dbus/media_transfer_protocol_daemon_client.h (revision 153859)
+++ chromeos/dbus/media_transfer_protocol_daemon_client.h (working copy)
@@ -196,6 +196,11 @@
// TODO(thestig) Consider using a file descriptor instead of the data.
typedef base::Callback<void(const std::string& data)> ReadFileCallback;
+ // A callback to handle the result of GetFileInfoByPath/Id.
+ // The argument is a file entry.
+ typedef base::Callback<void(const FileEntry& file_entry)
+ > GetFileInfoCallback;
+
// 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.
@@ -262,6 +267,21 @@
const ReadFileCallback& callback,
const ErrorCallback& error_callback) = 0;
+ // Calls GetFileInfoByPath method. |callback| is called after the method
+ // call succeeds, otherwise, |error_callback| is called.
+ virtual void GetFileInfoByPath(const std::string& handle,
+ const std::string& path,
+ const GetFileInfoCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Calls GetFileInfoById method. |callback| is called after the method
+ // call succeeds, otherwise, |error_callback| is called.
+ // |file_id| is a MTP-device specific id for a file.
+ virtual void GetFileInfoById(const std::string& handle,
+ uint32 file_id,
+ const GetFileInfoCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Registers given callback for events.
// |storage_event_handler| is called when a mtp storage attach or detach
// signal is received.
« no previous file with comments | « no previous file | chromeos/dbus/media_transfer_protocol_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698