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

Unified Diff: chrome/browser/media_gallery/win/mtp_device_object_entry.h

Issue 11297002: [Media Gallery] Added code to support mtp device media file system on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years, 1 month 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: chrome/browser/media_gallery/win/mtp_device_object_entry.h
diff --git a/chrome/browser/media_gallery/win/mtp_device_object_entry.h b/chrome/browser/media_gallery/win/mtp_device_object_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ecb0914c78b476337faaff50c8674f45e9712cb
--- /dev/null
+++ b/chrome/browser/media_gallery/win/mtp_device_object_entry.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This class manages all the information about the media transfer protocol
+// device (MTP) object entry. To support media file system operations, this
+// class is created, destroyed and operated on the blocking thread.
+
+#ifndef CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_
+#define CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_
+
+#include <vector>
+
+#include "base/string16.h"
+#include "base/time.h"
+
+namespace chrome {
+
+class MTPDeviceObjectEntry;
+typedef std::vector<MTPDeviceObjectEntry> MTPDeviceObjectEntries;
+
+// See comment at top of file for a complete class description.
+class MTPDeviceObjectEntry {
+ public:
+ MTPDeviceObjectEntry(); // Necessary for STL.
+ MTPDeviceObjectEntry(const string16& object_id,
+ const string16& object_name,
+ bool is_directory,
+ int64 size,
+ const base::Time& last_modified_time);
+
+ ~MTPDeviceObjectEntry();
+
+ // Accessor functions to get object details.
+ string16 object_id() const { return object_id_; }
+ string16 file_name() const { return name_; }
+ bool is_directory() const { return is_directory_; }
+ int64 size() const { return size_; }
+ base::Time last_modified_time() const { return last_modified_time_; }
+
+ private:
+ // The object identifier, e.g. "o299".
+ string16 object_id_;
+
+ // Friendly name of the object, e.g. "IMG_9911.jpeg".
+ string16 name_;
+
+ // True if the current object is a directory/folder/album content type.
+ bool is_directory_;
+
+ // The object file size in bytes, e.g. "882992".
+ int64 size_;
+
+ // Last modified time of the object.
+ base::Time last_modified_time_;
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_

Powered by Google App Engine
This is Rietveld 408576698