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_API_SYNC_DATA_H_ | 5 #ifndef SYNC_API_SYNC_DATA_H_ |
6 #define SYNC_API_SYNC_DATA_H_ | 6 #define SYNC_API_SYNC_DATA_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "sync/base/sync_export.h" |
13 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
14 #include "sync/internal_api/public/util/immutable.h" | 15 #include "sync/internal_api/public/util/immutable.h" |
15 | 16 |
16 namespace sync_pb { | 17 namespace sync_pb { |
17 class EntitySpecifics; | 18 class EntitySpecifics; |
18 class SyncEntity; | 19 class SyncEntity; |
19 } // namespace sync_pb | 20 } // namespace sync_pb |
20 | 21 |
21 namespace syncer { | 22 namespace syncer { |
22 | 23 |
23 // A light-weight container for immutable sync data. Pass-by-value and storage | 24 // A light-weight container for immutable sync data. Pass-by-value and storage |
24 // in STL containers are supported and encouraged if helpful. | 25 // in STL containers are supported and encouraged if helpful. |
25 class SyncData { | 26 class SYNC_EXPORT SyncData { |
26 public: | 27 public: |
27 // Creates an empty and invalid SyncData. | 28 // Creates an empty and invalid SyncData. |
28 SyncData(); | 29 SyncData(); |
29 ~SyncData(); | 30 ~SyncData(); |
30 | 31 |
31 // Default copy and assign welcome. | 32 // Default copy and assign welcome. |
32 | 33 |
33 // Helper methods for creating SyncData objects for local data. | 34 // Helper methods for creating SyncData objects for local data. |
34 // The sync tag must be a string unique to this datatype and is used as a node | 35 // The sync tag must be a string unique to this datatype and is used as a node |
35 // identifier server-side. | 36 // identifier server-side. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // The actual shared sync entity being held. | 113 // The actual shared sync entity being held. |
113 ImmutableSyncEntity immutable_entity_; | 114 ImmutableSyncEntity immutable_entity_; |
114 }; | 115 }; |
115 | 116 |
116 // gmock printer helper. | 117 // gmock printer helper. |
117 void PrintTo(const SyncData& sync_data, std::ostream* os); | 118 void PrintTo(const SyncData& sync_data, std::ostream* os); |
118 | 119 |
119 } // namespace syncer | 120 } // namespace syncer |
120 | 121 |
121 #endif // SYNC_API_SYNC_DATA_H_ | 122 #endif // SYNC_API_SYNC_DATA_H_ |
OLD | NEW |