| Index: chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h
|
| diff --git a/chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h b/chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h
|
| index 3cee4f70885de4d6a5e5dff85cef0c08189f315c..014c1cba2b179e7f2aa2f8e1aa03da9a6fba63b8 100644
|
| --- a/chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h
|
| +++ b/chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h
|
| @@ -5,10 +5,13 @@
|
| #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TABLE_READER_H_
|
| #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TABLE_READER_H_
|
|
|
| +#include <map>
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/files/file_path.h"
|
| #include "base/memory/scoped_vector.h"
|
| +#include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h"
|
|
|
| namespace base {
|
| class FilePath;
|
| @@ -20,23 +23,30 @@ class PmpColumnReader;
|
|
|
| class PmpTableReader {
|
| public:
|
| - PmpTableReader();
|
| + PmpTableReader(const std::string& table_name,
|
| + const base::FilePath& directory_path);
|
|
|
| virtual ~PmpTableReader();
|
|
|
| - // |columns| parameter will define, in-order, the columns returned by
|
| - // subsequent columns to GetColumns() if Init() succeeds.
|
| - bool Init(const std::string& table_name,
|
| - const base::FilePath& directory_path,
|
| - const std::vector<std::string>& columns);
|
| + // Returns NULL on failure.
|
| + const PmpColumnReader* AddColumn(const std::string& column_name,
|
| + const PmpFieldType expected_type);
|
|
|
| - // Returns a const "view" of the current contents of |column_readers_|.
|
| - std::vector<const PmpColumnReader*> GetColumns() const;
|
| + // Returns a const "view" of the successfully added columns.
|
| + std::map<std::string, const PmpColumnReader*> Columns() const;
|
|
|
| + // This value may change after calls to AddColumn().
|
| uint32 RowCount() const;
|
|
|
| private:
|
| + bool initialized_;
|
| +
|
| + std::string table_name_;
|
| + base::FilePath directory_path_;
|
| +
|
| ScopedVector<PmpColumnReader> column_readers_;
|
| + std::map<std::string, const PmpColumnReader*> column_map_;
|
| +
|
| uint32 max_row_count_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PmpTableReader);
|
|
|