| 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 WEBKIT_FILEAPI_MEDIA_PICASA_PMP_COLUMN_READER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_COLUMN_READER_H_ |
| 6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_COLUMN_READER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_COLUMN_READER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "webkit/fileapi/media/picasa/pmp_constants.h" | 13 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h" |
| 14 #include "webkit/storage/webkit_storage_export.h" | |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 class FilePath; | 16 class FilePath; |
| 18 } | 17 } |
| 19 | 18 |
| 20 namespace picasaimport { | 19 namespace picasaimport { |
| 21 | 20 |
| 22 // Reads a single PMP column from a file. | 21 // Reads a single PMP column from a file. |
| 23 class WEBKIT_STORAGE_EXPORT_PRIVATE PmpColumnReader { | 22 class PmpColumnReader { |
| 24 public: | 23 public: |
| 25 PmpColumnReader(); | 24 PmpColumnReader(); |
| 26 virtual ~PmpColumnReader(); | 25 virtual ~PmpColumnReader(); |
| 27 | 26 |
| 28 // Returns true if read successfully. | 27 // Returns true if read successfully. |
| 29 // |rows_read| is undefined if returns false. | 28 // |rows_read| is undefined if returns false. |
| 30 bool Init(const base::FilePath& filepath, uint32* rows_read); | 29 bool Init(const base::FilePath& filepath, uint32* rows_read); |
| 31 | 30 |
| 32 // These functions read the value of that |row| into |result|. | 31 // These functions read the value of that |row| into |result|. |
| 33 // Functions return false if the column is of the wrong type or the row | 32 // Functions return false if the column is of the wrong type or the row |
| (...skipping 23 matching lines...) Expand all Loading... |
| 57 uint32 rows_; | 56 uint32 rows_; |
| 58 | 57 |
| 59 // Index of string start locations if fields are strings. Empty otherwise. | 58 // Index of string start locations if fields are strings. Empty otherwise. |
| 60 std::vector<const char*> strings_; | 59 std::vector<const char*> strings_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(PmpColumnReader); | 61 DISALLOW_COPY_AND_ASSIGN(PmpColumnReader); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace picasaimport | 64 } // namespace picasaimport |
| 66 | 65 |
| 67 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_COLUMN_READER_H_ | 66 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_COLUMN_READER_H_ |
| OLD | NEW |