OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file defines the "sync API", an interface to the syncer | 5 // This file defines the "sync API", an interface to the syncer |
6 // backend that exposes (1) the core functionality of maintaining a consistent | 6 // backend that exposes (1) the core functionality of maintaining a consistent |
7 // local snapshot of a hierarchical object set; (2) a means to transactionally | 7 // local snapshot of a hierarchical object set; (2) a means to transactionally |
8 // access and modify those objects; (3) a means to control client/server | 8 // access and modify those objects; (3) a means to control client/server |
9 // synchronization tasks, namely: pushing local object modifications to a | 9 // synchronization tasks, namely: pushing local object modifications to a |
10 // server, pulling nonlocal object modifications from a server to this client, | 10 // server, pulling nonlocal object modifications from a server to this client, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // how you find a node's parent. | 198 // how you find a node's parent. |
199 int64 GetParentId() const; | 199 int64 GetParentId() const; |
200 | 200 |
201 // Nodes are either folders or not. This corresponds to the IS_DIR property | 201 // Nodes are either folders or not. This corresponds to the IS_DIR property |
202 // of syncable::Entry. | 202 // of syncable::Entry. |
203 bool GetIsFolder() const; | 203 bool GetIsFolder() const; |
204 | 204 |
205 // Returns the title of the object. | 205 // Returns the title of the object. |
206 // Uniqueness of the title is not enforced on siblings -- it is not an error | 206 // Uniqueness of the title is not enforced on siblings -- it is not an error |
207 // for two children to share a title. | 207 // for two children to share a title. |
208 std::wstring GetTitle() const; | 208 std::string GetTitle() const; |
209 | 209 |
210 // Returns the model type of this object. The model type is set at node | 210 // Returns the model type of this object. The model type is set at node |
211 // creation time and is expected never to change. | 211 // creation time and is expected never to change. |
212 syncable::ModelType GetModelType() const; | 212 syncable::ModelType GetModelType() const; |
213 | 213 |
214 // Getter specific to the BOOKMARK datatype. Returns protobuf | 214 // Getter specific to the BOOKMARK datatype. Returns protobuf |
215 // data. Can only be called if GetModelType() == BOOKMARK. | 215 // data. Can only be called if GetModelType() == BOOKMARK. |
216 const sync_pb::BookmarkSpecifics& GetBookmarkSpecifics() const; | 216 const sync_pb::BookmarkSpecifics& GetBookmarkSpecifics() const; |
217 | 217 |
218 // Legacy, bookmark-specific getter that wraps GetBookmarkSpecifics() above. | 218 // Legacy, bookmark-specific getter that wraps GetBookmarkSpecifics() above. |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 private: | 1085 private: |
1086 // An opaque pointer to the nested private class. | 1086 // An opaque pointer to the nested private class. |
1087 SyncInternal* data_; | 1087 SyncInternal* data_; |
1088 | 1088 |
1089 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 1089 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
1090 }; | 1090 }; |
1091 | 1091 |
1092 } // namespace sync_api | 1092 } // namespace sync_api |
1093 | 1093 |
1094 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1094 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
OLD | NEW |