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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 // Triggered when the file system is initially loaded. | 100 // Triggered when the file system is initially loaded. |
101 virtual void OnInitialLoadFinished() {} | 101 virtual void OnInitialLoadFinished() {} |
102 | 102 |
103 // Triggered when a document feed is fetched. |num_accumulated_entries| | 103 // Triggered when a document feed is fetched. |num_accumulated_entries| |
104 // tells the number of entries fetched so far. | 104 // tells the number of entries fetched so far. |
105 virtual void OnDocumentFeedFetched(int num_accumulated_entries) {} | 105 virtual void OnDocumentFeedFetched(int num_accumulated_entries) {} |
106 | 106 |
107 // Triggered when the feed from the server is loaded. | 107 // Triggered when the feed from the server is loaded. |
108 virtual void OnFeedFromServerLoaded() {} | 108 virtual void OnFeedFromServerLoaded() {} |
109 | 109 |
110 // Triggered when the file system is mounted. | |
111 virtual void OnFileSystemMounted() {} | |
112 // Triggered when the file system is getting unmounted. | |
satorux1
2012/08/03 18:21:14
is being unmounted
yoshiki
2012/08/03 20:10:31
Done.
| |
113 virtual void OnFileSystemUnmounting() {} | |
satorux1
2012/08/03 18:21:14
OnFileSystemBeingUnmounted
yoshiki
2012/08/03 20:10:31
Done.
| |
114 | |
110 protected: | 115 protected: |
111 virtual ~Observer() {} | 116 virtual ~Observer() {} |
112 }; | 117 }; |
113 | 118 |
114 // Initializes the object. This function should be called before any | 119 // Initializes the object. This function should be called before any |
115 // other functions. | 120 // other functions. |
116 virtual void Initialize() = 0; | 121 virtual void Initialize() = 0; |
117 | 122 |
118 // Adds and removes the observer. | 123 // Adds and removes the observer. |
119 virtual void AddObserver(Observer* observer) = 0; | 124 virtual void AddObserver(Observer* observer) = 0; |
120 virtual void RemoveObserver(Observer* observer) = 0; | 125 virtual void RemoveObserver(Observer* observer) = 0; |
121 | 126 |
122 // Starts and stops periodic updates. | 127 // Starts and stops periodic updates. |
123 virtual void StartUpdates() = 0; | 128 virtual void StartUpdates() = 0; |
124 virtual void StopUpdates() = 0; | 129 virtual void StopUpdates() = 0; |
125 | 130 |
131 // Notifies the file system was just mounted. | |
132 virtual void NotifyFileSystemMounted() = 0; | |
133 | |
134 // Notifies the file system is going to be unmounted. | |
135 virtual void NotifyFileSystemToBeUnmounted() = 0; | |
136 | |
126 // Checks for updates on the server. | 137 // Checks for updates on the server. |
127 virtual void CheckForUpdates() = 0; | 138 virtual void CheckForUpdates() = 0; |
128 | 139 |
129 // Finds an entry (file or directory) by using |resource_id|. This call | 140 // Finds an entry (file or directory) by using |resource_id|. This call |
130 // does not initiate content refreshing. | 141 // does not initiate content refreshing. |
131 // | 142 // |
132 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 143 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
133 virtual void GetEntryInfoByResourceId( | 144 virtual void GetEntryInfoByResourceId( |
134 const std::string& resource_id, | 145 const std::string& resource_id, |
135 const GetEntryInfoWithFilePathCallback& callback) = 0; | 146 const GetEntryInfoWithFilePathCallback& callback) = 0; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 const FilePath& virtual_dir_path, | 352 const FilePath& virtual_dir_path, |
342 scoped_ptr<DocumentEntry> entry, | 353 scoped_ptr<DocumentEntry> entry, |
343 const FilePath& file_content_path, | 354 const FilePath& file_content_path, |
344 GDataCache::FileOperationType cache_operation, | 355 GDataCache::FileOperationType cache_operation, |
345 const base::Closure& callback) = 0; | 356 const base::Closure& callback) = 0; |
346 }; | 357 }; |
347 | 358 |
348 } // namespace gdata | 359 } // namespace gdata |
349 | 360 |
350 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ | 361 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |