xref: /openbmc/phosphor-ipmi-flash/bmc/skip_action.cpp (revision 1038836c25abccea9f7ba71b97f7a12938132ba4)
1d53d60a4SPatrick Venture /*
2d53d60a4SPatrick Venture  * Copyright 2020 Google Inc.
3d53d60a4SPatrick Venture  *
4d53d60a4SPatrick Venture  * Licensed under the Apache License, Version 2.0 (the "License");
5d53d60a4SPatrick Venture  * you may not use this file except in compliance with the License.
6d53d60a4SPatrick Venture  * You may obtain a copy of the License at
7d53d60a4SPatrick Venture  *
8d53d60a4SPatrick Venture  *     http://www.apache.org/licenses/LICENSE-2.0
9d53d60a4SPatrick Venture  *
10d53d60a4SPatrick Venture  * Unless required by applicable law or agreed to in writing, software
11d53d60a4SPatrick Venture  * distributed under the License is distributed on an "AS IS" BASIS,
12d53d60a4SPatrick Venture  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13d53d60a4SPatrick Venture  * See the License for the specific language governing permissions and
14d53d60a4SPatrick Venture  * limitations under the License.
15d53d60a4SPatrick Venture  */
16d53d60a4SPatrick Venture 
17d53d60a4SPatrick Venture #include "skip_action.hpp"
18d53d60a4SPatrick Venture 
19d53d60a4SPatrick Venture #include <memory>
20d53d60a4SPatrick Venture 
21d53d60a4SPatrick Venture namespace ipmi_flash
22d53d60a4SPatrick Venture {
23d53d60a4SPatrick Venture 
CreateSkipAction()24d53d60a4SPatrick Venture std::unique_ptr<TriggerableActionInterface> SkipAction::CreateSkipAction()
25d53d60a4SPatrick Venture {
26d53d60a4SPatrick Venture     return std::make_unique<SkipAction>();
27d53d60a4SPatrick Venture }
28d53d60a4SPatrick Venture 
trigger()294175b4caSWilliam A. Kennington III bool SkipAction::trigger()
304175b4caSWilliam A. Kennington III {
314175b4caSWilliam A. Kennington III     if (cb)
324175b4caSWilliam A. Kennington III     {
334175b4caSWilliam A. Kennington III         cb(*this);
344175b4caSWilliam A. Kennington III     }
354175b4caSWilliam A. Kennington III     return true;
364175b4caSWilliam A. Kennington III }
374175b4caSWilliam A. Kennington III 
abort()38*1038836cSPatrick Williams void SkipAction::abort() {}
394175b4caSWilliam A. Kennington III 
status()404175b4caSWilliam A. Kennington III ActionStatus SkipAction::status()
414175b4caSWilliam A. Kennington III {
424175b4caSWilliam A. Kennington III     return ActionStatus::success;
434175b4caSWilliam A. Kennington III }
444175b4caSWilliam A. Kennington III 
45d53d60a4SPatrick Venture } // namespace ipmi_flash
46