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 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ | 5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ |
6 #define CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ | 6 #define CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "chrome/common/media_galleries/picasa_types.h" | 11 #include "chrome/common/media_galleries/picasa_types.h" |
12 | 12 |
13 namespace picasa { | 13 namespace picasa { |
14 | 14 |
15 const uint32 kAlbumCategoryAlbum = 0; | |
16 const uint32 kAlbumCategoryFolder = 2; | |
17 const uint32 kAlbumCategoryInvalid = 0xffff; // Sentinel value. | |
18 | |
19 const char kAlbumTokenPrefix[] = "]album:"; | |
20 | |
21 class PicasaAlbumTableReader { | 15 class PicasaAlbumTableReader { |
22 public: | 16 public: |
23 explicit PicasaAlbumTableReader(const AlbumTableFiles& table_files); | 17 explicit PicasaAlbumTableReader(const AlbumTableFiles& table_files); |
24 ~PicasaAlbumTableReader(); | 18 ~PicasaAlbumTableReader(); |
25 | 19 |
26 bool Init(); | 20 bool Init(); |
27 | 21 |
28 const std::vector<AlbumInfo>& albums() const; | 22 const std::vector<AlbumInfo>& albums() const; |
29 const std::vector<AlbumInfo>& folders() const; | 23 const std::vector<AlbumInfo>& folders() const; |
30 | 24 |
31 private: | 25 private: |
32 const AlbumTableFiles table_files_; | 26 const AlbumTableFiles table_files_; |
33 | 27 |
34 bool initialized_; | 28 bool initialized_; |
35 | 29 |
36 std::vector<AlbumInfo> albums_; | 30 std::vector<AlbumInfo> albums_; |
37 std::vector<AlbumInfo> folders_; | 31 std::vector<AlbumInfo> folders_; |
38 | 32 |
39 DISALLOW_COPY_AND_ASSIGN(PicasaAlbumTableReader); | 33 DISALLOW_COPY_AND_ASSIGN(PicasaAlbumTableReader); |
40 }; | 34 }; |
41 | 35 |
42 } // namespace picasa | 36 } // namespace picasa |
43 | 37 |
44 #endif // CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ | 38 #endif // CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUM_TABLE_READER_H_ |
OLD | NEW |