OLD | NEW |
---|---|
1 // Copyright (c) 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_SYNCABLE_DIRECTORY_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_H_ |
6 #define SYNC_SYNCABLE_DIRECTORY_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "sync/base/sync_export.h" | |
14 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" | 15 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" |
15 #include "sync/internal_api/public/util/weak_handle.h" | 16 #include "sync/internal_api/public/util/weak_handle.h" |
16 #include "sync/syncable/dir_open_result.h" | 17 #include "sync/syncable/dir_open_result.h" |
17 #include "sync/syncable/entry_kernel.h" | 18 #include "sync/syncable/entry_kernel.h" |
18 #include "sync/syncable/metahandle_set.h" | 19 #include "sync/syncable/metahandle_set.h" |
19 #include "sync/syncable/scoped_kernel_lock.h" | 20 #include "sync/syncable/scoped_kernel_lock.h" |
20 | 21 |
21 namespace syncer { | 22 namespace syncer { |
22 | 23 |
23 class Cryptographer; | 24 class Cryptographer; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 | 242 |
242 int64 NextMetahandle(); | 243 int64 NextMetahandle(); |
243 // Always returns a negative id. Positive client ids are generated | 244 // Always returns a negative id. Positive client ids are generated |
244 // by the server only. | 245 // by the server only. |
245 Id NextId(); | 246 Id NextId(); |
246 | 247 |
247 bool good() const { return NULL != kernel_; } | 248 bool good() const { return NULL != kernel_; } |
248 | 249 |
249 // The download progress is an opaque token provided by the sync server | 250 // The download progress is an opaque token provided by the sync server |
250 // to indicate the continuation state of the next GetUpdates operation. | 251 // to indicate the continuation state of the next GetUpdates operation. |
251 void GetDownloadProgress( | 252 SYNC_EXPORT void GetDownloadProgress( |
252 ModelType type, | 253 ModelType type, |
253 sync_pb::DataTypeProgressMarker* value_out) const; | 254 sync_pb::DataTypeProgressMarker* value_out) const; |
254 void GetDownloadProgressAsString( | 255 void GetDownloadProgressAsString( |
255 ModelType type, | 256 ModelType type, |
256 std::string* value_out) const; | 257 std::string* value_out) const; |
257 size_t GetEntriesCount() const; | 258 size_t GetEntriesCount() const; |
258 void SetDownloadProgress( | 259 void SetDownloadProgress( |
259 ModelType type, | 260 ModelType type, |
260 const sync_pb::DataTypeProgressMarker& value); | 261 const sync_pb::DataTypeProgressMarker& value); |
261 | 262 |
(...skipping 16 matching lines...) Expand all Loading... | |
278 | 279 |
279 // (Account) Bag of chip is an opaque state used by the server to track the | 280 // (Account) Bag of chip is an opaque state used by the server to track the |
280 // client. | 281 // client. |
281 std::string bag_of_chips() const; | 282 std::string bag_of_chips() const; |
282 void set_bag_of_chips(const std::string& bag_of_chips); | 283 void set_bag_of_chips(const std::string& bag_of_chips); |
283 | 284 |
284 std::string GetNotificationState() const; | 285 std::string GetNotificationState() const; |
285 void SetNotificationState(const std::string& notification_state); | 286 void SetNotificationState(const std::string& notification_state); |
286 | 287 |
287 // Unique to each account / client pair. | 288 // Unique to each account / client pair. |
288 std::string cache_guid() const; | 289 SYNC_EXPORT std::string cache_guid() const; |
akalin
2012/12/11 00:02:52
yeah, i guess I'm not sure if annotating member fu
Raghu Simha
2012/12/11 01:27:51
I did a bunch of grepping of the source code for o
| |
289 | 290 |
290 // Returns a pointer to our Nigori node handler. | 291 // Returns a pointer to our Nigori node handler. |
291 NigoriHandler* GetNigoriHandler(); | 292 NigoriHandler* GetNigoriHandler(); |
292 | 293 |
293 // Returns a pointer to our cryptographer. Does not transfer ownership. | 294 // Returns a pointer to our cryptographer. Does not transfer ownership. |
294 // Not thread safe, so should only be accessed while holding a transaction. | 295 // Not thread safe, so should only be accessed while holding a transaction. |
295 Cryptographer* GetCryptographer(const BaseTransaction* trans); | 296 Cryptographer* GetCryptographer(const BaseTransaction* trans); |
296 | 297 |
297 // Returns true if the directory had encountered an unrecoverable error. | 298 // Returns true if the directory had encountered an unrecoverable error. |
298 // Note: Any function in |Directory| that can be called without holding a | 299 // Note: Any function in |Directory| that can be called without holding a |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 NigoriHandler* const nigori_handler_; | 636 NigoriHandler* const nigori_handler_; |
636 Cryptographer* const cryptographer_; | 637 Cryptographer* const cryptographer_; |
637 | 638 |
638 InvariantCheckLevel invariant_check_level_; | 639 InvariantCheckLevel invariant_check_level_; |
639 }; | 640 }; |
640 | 641 |
641 } // namespace syncable | 642 } // namespace syncable |
642 } // namespace syncer | 643 } // namespace syncer |
643 | 644 |
644 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 645 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
OLD | NEW |