OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 explicit MTPDeviceObjectEnumerator(const MtpFileEntries& entries); | 23 explicit MTPDeviceObjectEnumerator(const MtpFileEntries& entries); |
24 | 24 |
25 virtual ~MTPDeviceObjectEnumerator(); | 25 virtual ~MTPDeviceObjectEnumerator(); |
26 | 26 |
27 // AbstractFileEnumerator: | 27 // AbstractFileEnumerator: |
28 virtual FilePath Next() OVERRIDE; | 28 virtual FilePath Next() OVERRIDE; |
29 virtual int64 Size() OVERRIDE; | 29 virtual int64 Size() OVERRIDE; |
30 virtual bool IsDirectory() OVERRIDE; | 30 virtual bool IsDirectory() OVERRIDE; |
31 virtual base::Time LastModifiedTime() OVERRIDE; | 31 virtual base::Time LastModifiedTime() OVERRIDE; |
32 | 32 |
| 33 // If the current file entry is valid, returns true and fills in |entry_id| |
| 34 // with the entry identifier else returns false and |entry_id| is not set. |
| 35 bool GetEntryId(uint32_t* entry_id); |
| 36 |
| 37 // Returns true if the enumerator has more entries to traverse, false |
| 38 // otherwise. |
| 39 bool HasMoreEntries(); |
| 40 |
33 private: | 41 private: |
34 // List of directory file entries information. | 42 // List of directory file entries information. |
35 const MtpFileEntries file_entries_; | 43 const MtpFileEntries file_entries_; |
36 | 44 |
37 // Iterator to access the individual file entries. | 45 // Iterator to access the individual file entries. |
38 MtpFileEntries::const_iterator file_entry_iter_; | 46 MtpFileEntries::const_iterator file_entry_iter_; |
39 | 47 |
40 // Stores the current file information. | 48 // Stores the current file information. |
41 MtpFileEntry current_file_info_; | 49 MtpFileEntry current_file_info_; |
42 | 50 |
43 DISALLOW_COPY_AND_ASSIGN(MTPDeviceObjectEnumerator); | 51 DISALLOW_COPY_AND_ASSIGN(MTPDeviceObjectEnumerator); |
44 }; | 52 }; |
45 | 53 |
46 } // namespace chrome | 54 } // namespace chrome |
47 | 55 |
48 #endif // CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ | 56 #endif // CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ |
OLD | NEW |