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
3 // found in the LICENSE file.
5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUMS_INDEXER_H_
6 #define CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUMS_INDEXER_H_
12 #include "base/files/file_path.h"
13 #include "chrome/common/media_galleries/picasa_types.h"
17 // Parses a series of INI files and builds up the set of files contained within
18 // the albums passed in through |album_uids|.
20 // Each INI file only describes the images contained within a single directory.
21 // To build the contents of all the albums, we read in all the INI files
22 // in all the Picasa folders.
24 // The INI albums also contain ".album*" sections describing the albums that
25 // have pictures in the same directory as the INI. However, we use the PMP
26 // database as the authoritative source on Album metadata, so we ignore those
27 // sections. The PMP derived |album_uids| are passed in by the constructor.
31 // [.album:e66fb059001aabcc69b262b7009fad90]
33 // token=e66fb059001aabcc69b262b7009fad90
34 // date=2013-03-15T14:53:21-07:00
36 // albums=e66fb059001aabcc69b262b7009fad90,18cb2df48aaa98e1c276b45cfcd81c95
37 // [.album:18cb2df48aaa98e1c276b45cfcd81c95]
39 // token=18cb2df48aaa98e1c276b45cfcd81c95
40 // date=2013-04-01T16:37:34-07:00
42 // albums=e66fb059001aabcc69b262b7009fad90
44 // albums=18cb2df48aaa98e1c276b45cfcd81c95
45 class PicasaAlbumsIndexer
{
47 explicit PicasaAlbumsIndexer(const AlbumUIDSet
& album_uids
);
48 ~PicasaAlbumsIndexer();
50 // This method should be called once for each Folder in the PMP database.
52 const std::vector
<picasa::FolderINIContents
>& folders_inis
);
54 const AlbumImagesMap
& albums_images() const { return albums_images_
; }
57 AlbumImagesMap albums_images_
;
59 DISALLOW_COPY_AND_ASSIGN(PicasaAlbumsIndexer
);
64 #endif // CHROME_UTILITY_MEDIA_GALLERIES_PICASA_ALBUMS_INDEXER_H_