OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // are ignored): | 206 // are ignored): |
207 | 207 |
208 /** | 208 /** |
209 * Gets the current notification state. | 209 * Gets the current notification state. |
210 * | 210 * |
211 * @param {function(boolean)} callback Called with whether or not | 211 * @param {function(boolean)} callback Called with whether or not |
212 * notifications are enabled. | 212 * notifications are enabled. |
213 */ | 213 */ |
214 // function getNotificationState(callback); | 214 // function getNotificationState(callback); |
215 | 215 |
216 /** | |
217 * Gets details about the root node. | |
218 * | |
219 * @param {function(!Object)} callback Called with details about the | |
220 * root node. | |
221 */ | |
222 // TODO(akalin): Change this to getRootNodeId or eliminate it | |
223 // entirely. | |
224 // function getRootNodeDetails(callback); | |
225 | |
226 /** | |
227 * Gets summary information for a list of ids. | |
228 * | |
229 * @param {Array.<string>} idList List of 64-bit ids in decimal | |
230 * string form. | |
231 * @param {Array.<{id: string, title: string, isFolder: boolean}>} | |
232 * callback Called with summaries for the nodes in idList that | |
233 * exist. | |
234 */ | |
235 // function getNodeSummariesById(idList, callback); | |
236 | |
237 /** | |
238 * Gets detailed information for a list of ids. | |
239 * | |
240 * @param {Array.<string>} idList List of 64-bit ids in decimal | |
241 * string form. | |
242 * @param {Array.<!Object>} callback Called with detailed | |
243 * information for the nodes in idList that exist. | |
244 */ | |
245 // function getNodeDetailsById(idList, callback); | |
246 | |
247 /** | |
248 * Gets child ids for a given id. | |
249 * | |
250 * @param {string} id 64-bit id in decimal string form of the parent | |
251 * node. | |
252 * @param {Array.<string>} callback Called with the (possibly empty) | |
253 * list of child ids. | |
254 */ | |
255 // function getChildNodeIds(id); | |
256 | |
257 virtual void OnInitializationComplete( | 216 virtual void OnInitializationComplete( |
258 const WeakHandle<JsBackend>& js_backend, | 217 const WeakHandle<JsBackend>& js_backend, |
259 const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener, | 218 const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener, |
260 bool success, | 219 bool success, |
261 ModelTypeSet restored_types) = 0; | 220 ModelTypeSet restored_types) = 0; |
262 | 221 |
263 // We are no longer permitted to communicate with the server. Sync should | 222 // We are no longer permitted to communicate with the server. Sync should |
264 // be disabled and state cleaned up at once. This can happen for a number | 223 // be disabled and state cleaned up at once. This can happen for a number |
265 // of reasons, e.g. swapping from a test instance to production, or a | 224 // of reasons, e.g. swapping from a test instance to production, or a |
266 // global stop syncing operation has wiped the store. | 225 // global stop syncing operation has wiped the store. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // Returns the SyncManager's encryption handler. | 375 // Returns the SyncManager's encryption handler. |
417 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; | 376 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; |
418 | 377 |
419 // Ask the SyncManager to fetch updates for the given types. | 378 // Ask the SyncManager to fetch updates for the given types. |
420 virtual void RefreshTypes(ModelTypeSet types) = 0; | 379 virtual void RefreshTypes(ModelTypeSet types) = 0; |
421 }; | 380 }; |
422 | 381 |
423 } // namespace syncer | 382 } // namespace syncer |
424 | 383 |
425 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 384 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |