Chromium Code Reviews| 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; |
|
Peter Kasting
2012/12/19 20:17:58
Nit: You can skip the class forward declaration by
kmadhusu
2012/12/20 20:37:29
Done.
|
| + |
| +// See comment at top of file for a complete class description. |
| +class MTPDeviceObjectEntry { |
|
Peter Kasting
2012/12/19 20:17:58
Since you have no other methods than a constructor
kmadhusu
2012/12/20 20:37:29
Done.
|
| + 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_ |