OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // will return FALSE. | 145 // will return FALSE. |
146 virtual bool InitByClientTagLookup(syncable::ModelType model_type, | 146 virtual bool InitByClientTagLookup(syncable::ModelType model_type, |
147 const std::string& tag) = 0; | 147 const std::string& tag) = 0; |
148 | 148 |
149 // Each object is identified by a 64-bit id (internally, the syncable | 149 // Each object is identified by a 64-bit id (internally, the syncable |
150 // metahandle). These ids are strictly local handles. They will persist | 150 // metahandle). These ids are strictly local handles. They will persist |
151 // on this client, but the same object on a different client may have a | 151 // on this client, but the same object on a different client may have a |
152 // different ID value. | 152 // different ID value. |
153 virtual int64 GetId() const; | 153 virtual int64 GetId() const; |
154 | 154 |
| 155 // Returns the modification time of the object (in TimeTicks internal format). |
| 156 int64 GetModificationTime() const; |
| 157 |
155 // Nodes are hierarchically arranged into a single-rooted tree. | 158 // Nodes are hierarchically arranged into a single-rooted tree. |
156 // InitByRootLookup on ReadNode allows access to the root. GetParentId is | 159 // InitByRootLookup on ReadNode allows access to the root. GetParentId is |
157 // how you find a node's parent. | 160 // how you find a node's parent. |
158 int64 GetParentId() const; | 161 int64 GetParentId() const; |
159 | 162 |
160 // Nodes are either folders or not. This corresponds to the IS_DIR property | 163 // Nodes are either folders or not. This corresponds to the IS_DIR property |
161 // of syncable::Entry. | 164 // of syncable::Entry. |
162 bool GetIsFolder() const; | 165 bool GetIsFolder() const; |
163 | 166 |
164 // Returns the title of the object. | 167 // Returns the title of the object. |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 // This allows actual HttpPostProvider subclass implementations to be | 971 // This allows actual HttpPostProvider subclass implementations to be |
969 // reference counted, which is useful if a particular implementation uses | 972 // reference counted, which is useful if a particular implementation uses |
970 // multiple threads to serve network requests. | 973 // multiple threads to serve network requests. |
971 virtual void Destroy(HttpPostProviderInterface* http) = 0; | 974 virtual void Destroy(HttpPostProviderInterface* http) = 0; |
972 virtual ~HttpPostProviderFactory() { } | 975 virtual ~HttpPostProviderFactory() { } |
973 }; | 976 }; |
974 | 977 |
975 } // namespace sync_api | 978 } // namespace sync_api |
976 | 979 |
977 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 980 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
OLD | NEW |