• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef UPDATER_COMMAND_PROCESS_H
16 #define UPDATER_COMMAND_PROCESS_H
17 
18 #include "applypatch/command.h"
19 #include "applypatch/command_function.h"
20 
21 namespace Updater {
22 class AbortCommandFn : public CommandFunction {
23 public:
AbortCommandFn()24     AbortCommandFn() {}
~AbortCommandFn()25     ~AbortCommandFn() override {}
26     CommandResult Execute(const Command &params) override;
27 };
28 
29 class NewCommandFn : public CommandFunction {
30 public:
NewCommandFn()31     NewCommandFn() {}
~NewCommandFn()32     ~NewCommandFn() override {}
33     CommandResult Execute(const Command &params) override;
34 };
35 
36 class ZeroAndEraseCommandFn : public CommandFunction {
37 public:
ZeroAndEraseCommandFn()38     ZeroAndEraseCommandFn() {}
~ZeroAndEraseCommandFn()39     ~ZeroAndEraseCommandFn() override {}
40     CommandResult Execute(const Command &params) override;
41 };
42 
43 class FreeCommandFn : public CommandFunction {
44 public:
FreeCommandFn()45     FreeCommandFn() {}
~FreeCommandFn()46     ~FreeCommandFn() override {}
47     CommandResult Execute(const Command &params) override;
48 };
49 
50 class StashCommandFn : public CommandFunction {
51 public:
StashCommandFn()52     StashCommandFn() {}
~StashCommandFn()53     ~StashCommandFn() override {}
54     CommandResult Execute(const Command &params) override;
55 };
56 
57 class DiffAndMoveCommandFn : public CommandFunction {
58 public:
DiffAndMoveCommandFn()59     DiffAndMoveCommandFn() {}
~DiffAndMoveCommandFn()60     ~DiffAndMoveCommandFn() override {}
61     CommandResult Execute(const Command &params) override;
62 };
63 }
64 #endif // UPDATER_COMMAND_PROCESS_H
65