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 22 matching lines...) Expand all Loading... |
33 FilePath path; | 33 FilePath path; |
34 bool is_directory; | 34 bool is_directory; |
35 }; | 35 }; |
36 | 36 |
37 // Used to get files from the file system. | 37 // Used to get files from the file system. |
38 typedef base::Callback<void(GDataFileError error, | 38 typedef base::Callback<void(GDataFileError error, |
39 const FilePath& file_path, | 39 const FilePath& file_path, |
40 const std::string& mime_type, | 40 const std::string& mime_type, |
41 GDataFileType file_type)> GetFileCallback; | 41 GDataFileType file_type)> GetFileCallback; |
42 | 42 |
43 // Used to get entry info from the file system, with the gdata file path. | |
44 // If |error| is not GDATA_FILE_OK, |file_info| is set to NULL. | |
45 // | |
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 | |
48 // directory names). | |
49 typedef base::Callback<void(GDataFileError error, | |
50 const FilePath& gdata_file_path, | |
51 scoped_ptr<GDataEntryProto> file_proto)> | |
52 GetEntryInfoWithFilePathCallback; | |
53 | |
54 // Used to read a directory from the file system. | 43 // Used to read a directory from the file system. |
55 // Similar to ReadDirectoryCallback but this one provides | 44 // Similar to ReadDirectoryCallback but this one provides |
56 // |hide_hosted_documents| | 45 // |hide_hosted_documents| |
57 // If |error| is not GDATA_FILE_OK, |entries| is set to NULL. | 46 // If |error| is not GDATA_FILE_OK, |entries| is set to NULL. |
58 // |entries| are contents, both files and directories, of the directory. | 47 // |entries| are contents, both files and directories, of the directory. |
59 typedef base::Callback<void(GDataFileError error, | 48 typedef base::Callback<void(GDataFileError error, |
60 bool hide_hosted_documents, | 49 bool hide_hosted_documents, |
61 scoped_ptr<GDataEntryProtoVector> entries)> | 50 scoped_ptr<GDataEntryProtoVector> entries)> |
62 ReadDirectoryWithSettingCallback; | 51 ReadDirectoryWithSettingCallback; |
63 | 52 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 const FilePath& virtual_dir_path, | 349 const FilePath& virtual_dir_path, |
361 scoped_ptr<DocumentEntry> entry, | 350 scoped_ptr<DocumentEntry> entry, |
362 const FilePath& file_content_path, | 351 const FilePath& file_content_path, |
363 GDataCache::FileOperationType cache_operation, | 352 GDataCache::FileOperationType cache_operation, |
364 const base::Closure& callback) = 0; | 353 const base::Closure& callback) = 0; |
365 }; | 354 }; |
366 | 355 |
367 } // namespace gdata | 356 } // namespace gdata |
368 | 357 |
369 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 358 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |