OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ActionProcessorDelegate *delegate_; | 71 ActionProcessorDelegate *delegate_; |
72 DISALLOW_COPY_AND_ASSIGN(ActionProcessor); | 72 DISALLOW_COPY_AND_ASSIGN(ActionProcessor); |
73 }; | 73 }; |
74 | 74 |
75 // A delegate object can be used to be notified of events that happen | 75 // A delegate object can be used to be notified of events that happen |
76 // in an ActionProcessor. An instance of this class can be passed to an | 76 // in an ActionProcessor. An instance of this class can be passed to an |
77 // ActionProcessor to register itself. | 77 // ActionProcessor to register itself. |
78 class ActionProcessorDelegate { | 78 class ActionProcessorDelegate { |
79 public: | 79 public: |
80 // Called when all processing in an ActionProcessor has completed. A pointer | 80 // Called when all processing in an ActionProcessor has completed. A pointer |
81 // to the ActionProcessor is passed. | 81 // to the ActionProcessor is passed. success is true iff all actions |
82 virtual void ProcessingDone(const ActionProcessor* processor) {} | 82 // completed successfully |
| 83 virtual void ProcessingDone(const ActionProcessor* processor, bool success) {} |
83 | 84 |
84 // Called when processing has stopped. Does not mean that all Actions have | 85 // Called when processing has stopped. Does not mean that all Actions have |
85 // completed. If/when all Actions complete, ProcessingDone() will be called. | 86 // completed. If/when all Actions complete, ProcessingDone() will be called. |
86 virtual void ProcessingStopped(const ActionProcessor* processor) {} | 87 virtual void ProcessingStopped(const ActionProcessor* processor) {} |
87 | 88 |
88 // Called whenever an action has finished processing, either successfully | 89 // Called whenever an action has finished processing, either successfully |
89 // or otherwise. | 90 // or otherwise. |
90 virtual void ActionCompleted(ActionProcessor* processor, | 91 virtual void ActionCompleted(ActionProcessor* processor, |
91 AbstractAction* action, | 92 AbstractAction* action, |
92 bool success) {} | 93 bool success) {} |
93 }; | 94 }; |
94 | 95 |
95 } // namespace chromeos_update_engine | 96 } // namespace chromeos_update_engine |
96 | 97 |
97 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ | 98 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PROCESSOR_H__ |
OLD | NEW |