Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: webkit/fileapi/media/picasa/pmp_table_reader.h

Issue 13529028: PicasaAlbumTableReader for Media Galleries API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0005-picasa-import-pmp-reader
Patch Set: Formatting fixes. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_ 5 #ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_ 6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h"
11 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "webkit/fileapi/media/picasa/pmp_constants.h"
12 #include "webkit/storage/webkit_storage_export.h" 14 #include "webkit/storage/webkit_storage_export.h"
13 15
14 namespace base { 16 namespace base {
15 class FilePath; 17 class FilePath;
16 } 18 }
17 19
18 namespace picasaimport { 20 namespace picasaimport {
19 21
20 class PmpColumnReader; 22 class PmpColumnReader;
21 23
22 class WEBKIT_STORAGE_EXPORT_PRIVATE PmpTableReader { 24 class WEBKIT_STORAGE_EXPORT_PRIVATE PmpTableReader {
23 public: 25 public:
24 PmpTableReader(); 26 PmpTableReader(const std::string& table_name,
27 const base::FilePath& directory_path);
25 28
26 virtual ~PmpTableReader(); 29 virtual ~PmpTableReader();
27 30
28 // |columns| parameter will define, in-order, the columns returned by 31 // |columns| parameter will define, in-order, the columns returned by
vandebo (ex-Chrome) 2013/04/08 23:57:24 Comment is out of date.
tommycli 2013/04/09 00:45:34 I see what you mean about comments being a burden
29 // subsequent columns to GetColumns() if Init() succeeds. 32 // subsequent columns to GetColumns() if Init() succeeds.
30 bool Init(const std::string& table_name, 33 bool Init();
31 const base::FilePath& directory_path, 34
32 const std::vector<std::string>& columns); 35 // Returns NULL on failure.
36 const PmpColumnReader* AddColumn(const std::string& column_name,
37 const PmpFieldType expected_type);
33 38
34 // Returns a const "view" of the current contents of |column_readers_|. 39 // Returns a const "view" of the current contents of |column_readers_|.
35 std::vector<const PmpColumnReader*> GetColumns() const; 40 std::vector<const PmpColumnReader*> GetColumns() const;
vandebo (ex-Chrome) 2013/04/08 23:57:24 std:map
tommycli 2013/04/09 00:45:34 Done.
36 41
42 // This value may change after calls to AddColumn().
37 uint32 RowCount() const; 43 uint32 RowCount() const;
38 44
39 private: 45 private:
46 std::string table_name_;
47 base::FilePath directory_path_;
48
40 ScopedVector<PmpColumnReader> column_readers_; 49 ScopedVector<PmpColumnReader> column_readers_;
41 uint32 max_row_count_; 50 uint32 max_row_count_;
42 51
43 DISALLOW_COPY_AND_ASSIGN(PmpTableReader); 52 DISALLOW_COPY_AND_ASSIGN(PmpTableReader);
44 }; 53 };
45 54
46 } // namespace picasaimport 55 } // namespace picasaimport
47 56
48 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_ 57 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698