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 // An implementation of Invalidator that wraps an invalidation | 5 // An implementation of Invalidator that wraps an invalidation |
6 // client. Handles the details of connecting to XMPP and hooking it | 6 // client. Handles the details of connecting to XMPP and hooking it |
7 // up to the invalidation client. | 7 // up to the invalidation client. |
8 // | 8 // |
9 // You probably don't want to use this directly; use | 9 // You probably don't want to use this directly; use |
10 // NonBlockingInvalidationNotifier. | 10 // NonBlockingInvalidator. |
11 | 11 |
12 #ifndef SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ | 12 #ifndef SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ |
13 #define SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ | 13 #define SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
20 #include "base/threading/non_thread_safe.h" | 20 #include "base/threading/non_thread_safe.h" |
(...skipping 27 matching lines...) Expand all Loading... |
48 invalidation_state_tracker, | 48 invalidation_state_tracker, |
49 const std::string& client_info); | 49 const std::string& client_info); |
50 | 50 |
51 virtual ~InvalidationNotifier(); | 51 virtual ~InvalidationNotifier(); |
52 | 52 |
53 // Invalidator implementation. | 53 // Invalidator implementation. |
54 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; | 54 virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE; |
55 virtual void UpdateRegisteredIds(InvalidationHandler* handler, | 55 virtual void UpdateRegisteredIds(InvalidationHandler* handler, |
56 const ObjectIdSet& ids) OVERRIDE; | 56 const ObjectIdSet& ids) OVERRIDE; |
57 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; | 57 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; |
| 58 virtual void Acknowledge(const invalidation::ObjectId& id, |
| 59 const AckHandle& ack_handle) OVERRIDE; |
58 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; | 60 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; |
59 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; | 61 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; |
60 virtual void UpdateCredentials( | 62 virtual void UpdateCredentials( |
61 const std::string& email, const std::string& token) OVERRIDE; | 63 const std::string& email, const std::string& token) OVERRIDE; |
62 virtual void SendInvalidation( | 64 virtual void SendInvalidation( |
63 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 65 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
64 | 66 |
65 // SyncInvalidationListener::Delegate implementation. | 67 // SyncInvalidationListener::Delegate implementation. |
66 virtual void OnInvalidate( | 68 virtual void OnInvalidate( |
67 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 69 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 101 |
100 // The invalidation listener. | 102 // The invalidation listener. |
101 SyncInvalidationListener invalidation_listener_; | 103 SyncInvalidationListener invalidation_listener_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); | 105 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); |
104 }; | 106 }; |
105 | 107 |
106 } // namespace syncer | 108 } // namespace syncer |
107 | 109 |
108 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ | 110 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ |
OLD | NEW |