OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // If |error| is not PLATFORM_FILE_OK, |file_info| is set to NULL. | 44 // If |error| is not PLATFORM_FILE_OK, |file_info| is set to NULL. |
45 // | 45 // |
46 // |gdata_file_path| parameter is provided as GDataEntryProto does not contain | 46 // |gdata_file_path| parameter is provided as GDataEntryProto does not contain |
47 // the gdata file path (i.e. only contains the base name without parent | 47 // the gdata file path (i.e. only contains the base name without parent |
48 // directory names). | 48 // directory names). |
49 typedef base::Callback<void(GDataFileError error, | 49 typedef base::Callback<void(GDataFileError error, |
50 const FilePath& gdata_file_path, | 50 const FilePath& gdata_file_path, |
51 scoped_ptr<GDataEntryProto> file_proto)> | 51 scoped_ptr<GDataEntryProto> file_proto)> |
52 GetEntryInfoWithFilePathCallback; | 52 GetEntryInfoWithFilePathCallback; |
53 | 53 |
54 // Used to get entry info from the file system. | |
55 // If |error| is not PLATFORM_FILE_OK, |entry_info| is set to NULL. | |
56 typedef base::Callback<void(GDataFileError error, | |
57 scoped_ptr<GDataEntryProto> entry_proto)> | |
58 GetEntryInfoCallback; | |
59 | |
60 // Used to read a directory from the file system. | |
61 // If |error| is not PLATFORM_FILE_OK, |entries| is set to NULL. | |
62 // |entries| are contents, both files and directories, of the directory. | |
63 typedef std::vector<GDataEntryProto> GDataEntryProtoVector; | |
64 typedef base::Callback<void(GDataFileError error, | |
65 scoped_ptr<GDataEntryProtoVector> entries)> | |
66 ReadDirectoryCallback; | |
67 | |
68 // Used to get drive content search results. | 54 // Used to get drive content search results. |
69 // If |error| is not PLATFORM_FILE_OK, |result_paths| is empty. | 55 // If |error| is not PLATFORM_FILE_OK, |result_paths| is empty. |
70 typedef base::Callback<void( | 56 typedef base::Callback<void( |
71 GDataFileError error, | 57 GDataFileError error, |
72 const GURL& next_feed, | 58 const GURL& next_feed, |
73 scoped_ptr<std::vector<SearchResultInfo> > result_paths)> SearchCallback; | 59 scoped_ptr<std::vector<SearchResultInfo> > result_paths)> SearchCallback; |
74 | 60 |
75 // Used to open files from the file system. |file_path| is the path on the local | 61 // Used to open files from the file system. |file_path| is the path on the local |
76 // file system for the opened file. | 62 // file system for the opened file. |
77 typedef base::Callback<void(GDataFileError error, | 63 typedef base::Callback<void(GDataFileError error, |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 const FilePath& virtual_dir_path, | 340 const FilePath& virtual_dir_path, |
355 scoped_ptr<DocumentEntry> entry, | 341 scoped_ptr<DocumentEntry> entry, |
356 const FilePath& file_content_path, | 342 const FilePath& file_content_path, |
357 GDataCache::FileOperationType cache_operation, | 343 GDataCache::FileOperationType cache_operation, |
358 const base::Closure& callback) = 0; | 344 const base::Closure& callback) = 0; |
359 }; | 345 }; |
360 | 346 |
361 } // namespace gdata | 347 } // namespace gdata |
362 | 348 |
363 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 349 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |