1 /*
2  * Copyright (c) 2024 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 
16 #ifndef OHOS_ABILITY_MANAGER_RADAR_H
17 #define OHOS_ABILITY_MANAGER_RADAR_H
18 
19 #include <cstdint>
20 #include <chrono>
21 #include <string>
22 #include <vector>
23 
24 namespace OHOS {
25 namespace AAFWK {
26 enum class BizScene : int32_t {
27     CLICK_ICON = 10,
28     SAVE_DATA = 11,
29 };
30 
31 enum class StageRes : int32_t {
32     STAGE_IDLE = 0,
33     STAGE_SUCC = 1,
34     STAGE_FAIL = 2,
35     STAGE_CANCEL = 3,
36     STAGE_UNKNOW = 4,
37 };
38 
39 enum class BizState : int32_t {
40     BIZ_STATE_START = 1,
41     BIZ_STATE_END = 2,
42 };
43 
44 enum class ClickIcon : int32_t {
45     CLICKICON_CONTINUE = 3,
46     CLICKICON_STARTABILITY = 6,
47     CLICKICON_RECV_OVER = 9,
48 };
49 
50 enum class SaveData : int32_t {
51     SAVEDATA_CONTINUE = 2,
52     SAVEDATA_RES = 3,
53     SAVEDATA_REMOTE_WANT = 4,
54 };
55 
56 class ContinueRadar {
57 public:
58     static ContinueRadar &GetInstance();
59 
60     bool ClickIconContinue(const std::string& func);
61     bool ClickIconStartAbility(const std::string& func, unsigned int flags, int32_t errCode);
62     bool ClickIconRecvOver(const std::string& func);
63     bool SaveDataContinue(const std::string& func);
64     bool SaveDataRes(const std::string& func);
65     bool SaveDataRemoteWant(const std::string& func);
66 };
67 } // namespace AAFWK
68 } // namespace OHOS
69 #endif // OHOS_ABILITY_MANAGER_RADAR_H