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

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

Issue 12704024: Simple PMP reader to parse Picasa's metadata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rvalue usage in move operation. 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
(Empty)
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.
4
5 #ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_vector.h"
12
13 namespace base {
14 class FilePath;
15 }
16
17 namespace fileapi {
18
19 class PmpColumnReader;
20
21 class PmpTableReader {
22 public:
23 PmpTableReader(const std::string& table_name,
24 const base::FilePath& directory_path,
25 const std::vector<std::string>& columns);
26
27 virtual ~PmpTableReader();
28
29 // |columns| parameter will define, in-order, the columns returned by
30 // subsequent columns to GetColumns() if ReadFromDisk() succeeds.
31 // Warning: Invalidates previously obtained pointers from GetColumns().
vandebo (ex-Chrome) 2013/03/28 00:56:04 It seems that this class doesn't need to be reusea
tommycli 2013/03/29 00:16:01 Done.
32 bool ReadFromDisk();
33
34 // Returns a const "view" of the current contents of |column_readers_|.
35 // Warning: Calling ReadFromDisk() will invalidate pointers returned here.
36 std::vector<const PmpColumnReader*> GetColumns() const;
37
38 uint32 RowCount() const;
39
40 private:
41 const std::string& table_name_;
42 const base::FilePath& directory_path_;
43 const std::vector<std::string>& columns_;
44
45 // Contains the last 'good' read of the disk.
46 ScopedVector<PmpColumnReader> column_readers_;
47 // Contains the number of rows obtained during the last 'good' read of disk.
48 uint32 max_row_count_;
49
50 DISALLOW_COPY_AND_ASSIGN(PmpTableReader);
51 };
52
53 } // namespace fileapi
54
55 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698