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_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/drive/drive.pb.h" | 12 #include "chrome/browser/chromeos/drive/drive.pb.h" |
13 #include "chrome/browser/chromeos/drive/file_cache.h" | 13 #include "chrome/browser/chromeos/drive/file_cache.h" |
14 #include "chrome/browser/chromeos/drive/file_system_metadata.h" | 14 #include "chrome/browser/chromeos/drive/file_system_metadata.h" |
15 #include "chrome/browser/chromeos/drive/resource_metadata.h" | 15 #include "chrome/browser/chromeos/drive/resource_metadata.h" |
16 #include "chrome/browser/google_apis/gdata_wapi_operations.h" | 16 #include "chrome/browser/google_apis/gdata_wapi_operations.h" |
17 | 17 |
18 namespace google_apis { | |
19 class ResourceEntry; | |
20 } | |
21 | |
22 namespace drive { | 18 namespace drive { |
23 | 19 |
24 class FileSystemObserver; | 20 class FileSystemObserver; |
25 | 21 |
26 typedef std::vector<ResourceEntry> ResourceEntryVector; | 22 typedef std::vector<ResourceEntry> ResourceEntryVector; |
27 | 23 |
28 // Information about search result returned by Search Async callback. | 24 // Information about search result returned by Search Async callback. |
29 // This is data needed to create a file system entry that will be used by file | 25 // This is data needed to create a file system entry that will be used by file |
30 // browser. | 26 // browser. |
31 struct SearchResultInfo { | 27 struct SearchResultInfo { |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // Creates a file at |file_path|. If the flag |is_exclusive| is true, an | 280 // Creates a file at |file_path|. If the flag |is_exclusive| is true, an |
285 // error is raised when a file already exists at the path. It is | 281 // error is raised when a file already exists at the path. It is |
286 // an error if a directory or a hosted document is already present at the | 282 // an error if a directory or a hosted document is already present at the |
287 // path, or the parent directory of the path is not present yet. | 283 // path, or the parent directory of the path is not present yet. |
288 // | 284 // |
289 // |callback| must not be null. | 285 // |callback| must not be null. |
290 virtual void CreateFile(const base::FilePath& file_path, | 286 virtual void CreateFile(const base::FilePath& file_path, |
291 bool is_exclusive, | 287 bool is_exclusive, |
292 const FileOperationCallback& callback) = 0; | 288 const FileOperationCallback& callback) = 0; |
293 | 289 |
294 // Touchs the file at |file_path| by updating the timestamp to | 290 // Touches the file at |file_path| by updating the timestamp to |
295 // |last_access_time| and |last_modified_time|. | 291 // |last_access_time| and |last_modified_time|. |
296 // Upon completion, invokes |callback|. | 292 // Upon completion, invokes |callback|. |
297 // Note that, differently from unix touch command, this doesn't create a file | 293 // Note that, differently from unix touch command, this doesn't create a file |
298 // if the target file doesn't exist. | 294 // if the target file doesn't exist. |
299 // | 295 // |
300 // |last_access_time|, |last_modified_time| and |callback| must not be null. | 296 // |last_access_time|, |last_modified_time| and |callback| must not be null. |
301 virtual void TouchFile(const base::FilePath& file_path, | 297 virtual void TouchFile(const base::FilePath& file_path, |
302 const base::Time& last_access_time, | 298 const base::Time& last_access_time, |
303 const base::Time& last_modified_time, | 299 const base::Time& last_modified_time, |
304 const FileOperationCallback& callback) = 0; | 300 const FileOperationCallback& callback) = 0; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 const std::string& md5, | 453 const std::string& md5, |
458 const GetCacheEntryCallback& callback) = 0; | 454 const GetCacheEntryCallback& callback) = 0; |
459 | 455 |
460 // Reloads the file system feeds from the server. | 456 // Reloads the file system feeds from the server. |
461 virtual void Reload() = 0; | 457 virtual void Reload() = 0; |
462 }; | 458 }; |
463 | 459 |
464 } // namespace drive | 460 } // namespace drive |
465 | 461 |
466 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 462 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |