OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | |
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 namespace base { | |
13 class DictionaryValue; | |
14 class Value; | |
15 } // namespace | |
16 | |
17 namespace syncer { | |
18 | |
19 // Opaque class that represents an ack handle. | |
20 // TODO(dcheng): This is just a refactoring change, so the class is empty for | |
21 // the moment. It will be filled once we start implementing 'reminders'. | |
22 class AckHandle { | |
23 public: | |
24 bool Equals(const AckHandle& other) const; | |
25 | |
26 scoped_ptr<base::Value> ToValue() const; | |
27 | |
28 bool ResetFromValue(const base::Value& value); | |
29 }; | |
30 | |
31 struct InvalidationState { | |
32 std::string payload; | |
33 AckHandle ack_handle; | |
34 | |
35 bool Equals(const InvalidationState& other) const; | |
36 | |
37 // Caller owns the returned DictionaryValue. | |
38 scoped_ptr<base::DictionaryValue> ToValue() const; | |
39 | |
40 bool ResetFromValue(const base::DictionaryValue& value); | |
41 }; | |
42 | |
43 } // namespace syncer | |
44 | |
45 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_ | |
OLD | NEW |