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_BASE_NODE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 int64 GetPredecessorId() const; | 184 int64 GetPredecessorId() const; |
185 | 185 |
186 // Return the ID of the node immediately after this in the sibling order. | 186 // Return the ID of the node immediately after this in the sibling order. |
187 // For the last node in the ordering, return 0. | 187 // For the last node in the ordering, return 0. |
188 int64 GetSuccessorId() const; | 188 int64 GetSuccessorId() const; |
189 | 189 |
190 // Return the ID of the first child of this node. If this node has no | 190 // Return the ID of the first child of this node. If this node has no |
191 // children, return 0. | 191 // children, return 0. |
192 int64 GetFirstChildId() const; | 192 int64 GetFirstChildId() const; |
193 | 193 |
194 // Returns an ordered list of the children of this node. | |
Nicolas Zea
2013/05/22 22:34:02
nit: mention what the order is?
rlarocque
2013/05/23 00:39:39
Done.
| |
195 void GetChildIds(std::vector<int64>* result) const; | |
196 | |
194 // Returns the total number of nodes including and beneath this node. | 197 // Returns the total number of nodes including and beneath this node. |
195 // Recursively iterates through all children. | 198 // Recursively iterates through all children. |
196 int GetTotalNodeCount() const; | 199 int GetTotalNodeCount() const; |
197 | 200 |
198 // These virtual accessors provide access to data members of derived classes. | 201 // These virtual accessors provide access to data members of derived classes. |
199 virtual const syncable::Entry* GetEntry() const = 0; | 202 virtual const syncable::Entry* GetEntry() const = 0; |
200 virtual const BaseTransaction* GetTransaction() const = 0; | 203 virtual const BaseTransaction* GetTransaction() const = 0; |
201 | 204 |
202 // Dumps a summary of node info into a DictionaryValue and returns it. | 205 // Dumps a summary of node info into a DictionaryValue and returns it. |
203 // Transfers ownership of the DictionaryValue to the caller. | 206 // Transfers ownership of the DictionaryValue to the caller. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 | 255 |
253 // Same as |unencrypted_data_|, but for legacy password encryption. | 256 // Same as |unencrypted_data_|, but for legacy password encryption. |
254 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; | 257 scoped_ptr<sync_pb::PasswordSpecificsData> password_data_; |
255 | 258 |
256 DISALLOW_COPY_AND_ASSIGN(BaseNode); | 259 DISALLOW_COPY_AND_ASSIGN(BaseNode); |
257 }; | 260 }; |
258 | 261 |
259 } // namespace syncer | 262 } // namespace syncer |
260 | 263 |
261 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ | 264 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ |
OLD | NEW |