| 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_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__ |
| 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <tr1/memory> | 9 #include <tr1/memory> |
| 10 #include <iostream> | 10 #include <iostream> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 // Forward declare a couple classes we use. | 119 // Forward declare a couple classes we use. |
| 120 template<typename T> | 120 template<typename T> |
| 121 class ActionPipe; | 121 class ActionPipe; |
| 122 template<typename T> | 122 template<typename T> |
| 123 class ActionTraits; | 123 class ActionTraits; |
| 124 | 124 |
| 125 template<typename SubClass> | 125 template<typename SubClass> |
| 126 class Action : public AbstractAction { | 126 class Action : public AbstractAction { |
| 127 public: | 127 public: |
| 128 virtual ~Action() { | 128 virtual ~Action() {} |
| 129 LOG(INFO) << "Action died"; | |
| 130 } | |
| 131 | 129 |
| 132 // Attaches an input pipe to this Action. This is optional; an Action | 130 // Attaches an input pipe to this Action. This is optional; an Action |
| 133 // doesn't need to have an input pipe. The input pipe must be of the type | 131 // doesn't need to have an input pipe. The input pipe must be of the type |
| 134 // of object that this class expects. | 132 // of object that this class expects. |
| 135 // This is generally called by ActionPipe::Bond() | 133 // This is generally called by ActionPipe::Bond() |
| 136 void set_in_pipe( | 134 void set_in_pipe( |
| 137 // this type is a fancy way of saying: a shared_ptr to an | 135 // this type is a fancy way of saying: a shared_ptr to an |
| 138 // ActionPipe<InputObjectType>. | 136 // ActionPipe<InputObjectType>. |
| 139 const std::tr1::shared_ptr<ActionPipe< | 137 const std::tr1::shared_ptr<ActionPipe< |
| 140 typename ActionTraits<SubClass>::InputObjectType> >& | 138 typename ActionTraits<SubClass>::InputObjectType> >& |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ActionPipe<typename ActionTraits<SubClass>::InputObjectType> > | 194 ActionPipe<typename ActionTraits<SubClass>::InputObjectType> > |
| 197 in_pipe_; | 195 in_pipe_; |
| 198 std::tr1::shared_ptr< | 196 std::tr1::shared_ptr< |
| 199 ActionPipe<typename ActionTraits<SubClass>::OutputObjectType> > | 197 ActionPipe<typename ActionTraits<SubClass>::OutputObjectType> > |
| 200 out_pipe_; | 198 out_pipe_; |
| 201 }; | 199 }; |
| 202 | 200 |
| 203 }; // namespace chromeos_update_engine | 201 }; // namespace chromeos_update_engine |
| 204 | 202 |
| 205 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__ | 203 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H__ |
| OLD | NEW |