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

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: More formatting/ style changes. Created 7 years, 9 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 #include <vector>
10
11 #include "base/basictypes.h"
12
13 namespace base {
14 class FilePath;
15 }
16
17 namespace fileapi {
18
19 class PmpColumnReader;
20
21 class PmpTableReader {
22 public:
23 explicit PmpTableReader();
vandebo (ex-Chrome) 2013/03/27 00:06:19 explicit is only needed for exactly one arg.
tommycli 2013/03/27 19:34:30 Done.
24
25 virtual ~PmpTableReader();
26
27 // |columns| parameter will define, in-order, the columns returned by
28 // subsequent columns to GetColumns() if ReadFromDisk() succeeds.
29 // Warning: Invalidates previously obtained pointers from GetColumns().
30 bool ReadFromDisk(
vandebo (ex-Chrome) 2013/03/27 00:06:19 Why not put all these args in the constructor?
vandebo (ex-Chrome) 2013/03/27 00:06:19 If this interface reads from disk, it seems like t
tommycli 2013/03/27 19:34:30 Done.
tommycli 2013/03/27 19:34:30 Done.
31 const std::string& table_name,
32 const base::FilePath& directory_path,
33 const std::vector<std::string>& columns);
34
35 // Returns a const "view" of the current contents of |column_readers_|.
36 // Warning: Calling ReadFromDisk() will invalidate pointers returned here.
37 std::vector<const PmpColumnReader*> GetColumns() const;
38
39 uint32 Count() const;
vandebo (ex-Chrome) 2013/03/27 00:06:19 ColumnCount?
tommycli 2013/03/27 19:34:30 Done.
40
41 private:
42 static void FreeAndClearContents(std::vector<PmpColumnReader*> readers);
43
44 // Contains the last 'good' read of the disk.
45 std::vector<PmpColumnReader*> column_readers_;
vandebo (ex-Chrome) 2013/03/27 00:06:19 probably want to use base/memory/scoped_vector.h h
tommycli 2013/03/27 19:34:30 Yep! That's what I want. Btw - awesome that it imp
46 // Contains the number of rows obtained during the last 'good' read of disk.
47 uint32 max_row_count_;
48
49 DISALLOW_COPY_AND_ASSIGN(PmpTableReader);
50 };
51
52 } // namespace fileapi
53
54 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_TABLE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698