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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Notifies the file system is going to be unmounted. | 130 // Notifies the file system is going to be unmounted. |
131 virtual void NotifyFileSystemToBeUnmounted() = 0; | 131 virtual void NotifyFileSystemToBeUnmounted() = 0; |
132 | 132 |
133 // Checks for updates on the server. | 133 // Checks for updates on the server. |
134 virtual void CheckForUpdates() = 0; | 134 virtual void CheckForUpdates() = 0; |
135 | 135 |
136 // Finds an entry (file or directory) by using |resource_id|. This call | 136 // Finds an entry (file or directory) by using |resource_id|. This call |
137 // does not initiate content refreshing. | 137 // does not initiate content refreshing. |
138 // | 138 // |
139 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 139 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 140 // |callback| must not be null. |
140 virtual void GetEntryInfoByResourceId( | 141 virtual void GetEntryInfoByResourceId( |
141 const std::string& resource_id, | 142 const std::string& resource_id, |
142 const GetEntryInfoWithFilePathCallback& callback) = 0; | 143 const GetEntryInfoWithFilePathCallback& callback) = 0; |
143 | 144 |
144 // Initiates transfer of |remote_src_file_path| to |local_dest_file_path|. | 145 // Initiates transfer of |remote_src_file_path| to |local_dest_file_path|. |
145 // |remote_src_file_path| is the virtual source path on the gdata file system. | 146 // |remote_src_file_path| is the virtual source path on the gdata file system. |
146 // |local_dest_file_path| is the destination path on the local file system. | 147 // |local_dest_file_path| is the destination path on the local file system. |
147 // | 148 // |
148 // Must be called from *UI* thread. |callback| is run on the calling thread. | 149 // Must be called from *UI* thread. |callback| is run on the calling thread. |
149 // |callback| must not be null. | 150 // |callback| must not be null. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // Can be called from UI/IO thread. |callback| and is run on the calling | 296 // Can be called from UI/IO thread. |callback| and is run on the calling |
296 // thread. | 297 // thread. |
297 virtual void UpdateFileByResourceId( | 298 virtual void UpdateFileByResourceId( |
298 const std::string& resource_id, | 299 const std::string& resource_id, |
299 const FileOperationCallback& callback) = 0; | 300 const FileOperationCallback& callback) = 0; |
300 | 301 |
301 // Finds an entry (a file or a directory) by |file_path|. This call will also | 302 // Finds an entry (a file or a directory) by |file_path|. This call will also |
302 // retrieve and refresh file system content from server and disk cache. | 303 // retrieve and refresh file system content from server and disk cache. |
303 // | 304 // |
304 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 305 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 306 // |callback| must not be null. |
305 virtual void GetEntryInfoByPath(const FilePath& file_path, | 307 virtual void GetEntryInfoByPath(const FilePath& file_path, |
306 const GetEntryInfoCallback& callback) = 0; | 308 const GetEntryInfoCallback& callback) = 0; |
307 | 309 |
308 // Finds and reads a directory by |file_path|. This call will also retrieve | 310 // Finds and reads a directory by |file_path|. This call will also retrieve |
309 // and refresh file system content from server and disk cache. | 311 // and refresh file system content from server and disk cache. |
310 // | 312 // |
311 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 313 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
| 314 // |callback| must not be null. |
312 virtual void ReadDirectoryByPath( | 315 virtual void ReadDirectoryByPath( |
313 const FilePath& file_path, | 316 const FilePath& file_path, |
314 const ReadDirectoryWithSettingCallback& callback) = 0; | 317 const ReadDirectoryWithSettingCallback& callback) = 0; |
315 | 318 |
316 // Requests a refresh of the directory pointed by |file_path| (i.e. fetches | 319 // Requests a refresh of the directory pointed by |file_path| (i.e. fetches |
317 // the latest metadata of files in the target directory). | 320 // the latest metadata of files in the target directory). |
318 // | 321 // |
319 // In particular, this function is used to get the latest thumbnail | 322 // In particular, this function is used to get the latest thumbnail |
320 // URLs. Thumbnail URLs change periodically even if contents of files are | 323 // URLs. Thumbnail URLs change periodically even if contents of files are |
321 // not changed, hence we should get the new thumbnail URLs manually if we | 324 // not changed, hence we should get the new thumbnail URLs manually if we |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 const FilePath& virtual_dir_path, | 360 const FilePath& virtual_dir_path, |
358 scoped_ptr<DocumentEntry> entry, | 361 scoped_ptr<DocumentEntry> entry, |
359 const FilePath& file_content_path, | 362 const FilePath& file_content_path, |
360 GDataCache::FileOperationType cache_operation, | 363 GDataCache::FileOperationType cache_operation, |
361 const base::Closure& callback) = 0; | 364 const base::Closure& callback) = 0; |
362 }; | 365 }; |
363 | 366 |
364 } // namespace gdata | 367 } // namespace gdata |
365 | 368 |
366 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 369 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |