| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // These data structures can be used to describe the contents of an iPhoto | 5 // These data structures can be used to describe the contents of an iPhoto |
| 6 // library. | 6 // library. |
| 7 | 7 |
| 8 #ifndef CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ | 8 #ifndef CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ |
| 9 #define CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ | 9 #define CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <set> | 12 #include <set> |
| 13 | 13 |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 | 15 |
| 16 namespace iphoto { | 16 namespace iphoto { |
| 17 namespace parser { | 17 namespace parser { |
| 18 | 18 |
| 19 struct Photo { | 19 struct Photo { |
| 20 Photo(); | 20 Photo(); |
| 21 Photo(uint64 id, const base::FilePath& location); | 21 Photo(uint64 id, |
| 22 const base::FilePath& location, |
| 23 const base::FilePath& original_location); |
| 22 bool operator<(const Photo& other) const; | 24 bool operator<(const Photo& other) const; |
| 23 | 25 |
| 24 uint64 id; | 26 uint64 id; |
| 25 base::FilePath location; | 27 base::FilePath location; |
| 28 base::FilePath original_location; |
| 26 }; | 29 }; |
| 27 | 30 |
| 28 typedef std::set<uint64> Album; | 31 typedef std::set<uint64> Album; |
| 29 typedef std::map<std::string /*album name*/, Album> Albums; | 32 typedef std::map<std::string /*album name*/, Album> Albums; |
| 30 | 33 |
| 31 struct Library { | 34 struct Library { |
| 32 Library(); | 35 Library(); |
| 33 Library(const Albums& albums, const std::set<Photo>& all_photos); | 36 Library(const Albums& albums, const std::set<Photo>& all_photos); |
| 34 ~Library(); | 37 ~Library(); |
| 35 | 38 |
| 36 Albums albums; | 39 Albums albums; |
| 37 std::set<Photo> all_photos; | 40 std::set<Photo> all_photos; |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace parser | 43 } // namespace parser |
| 41 } // namespace iphoto | 44 } // namespace iphoto |
| 42 | 45 |
| 43 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ | 46 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ |
| 44 | 47 |
| OLD | NEW |