1 /*
2  * Copyright (c) 2022 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 CONCURRENT_TASK_SERVICES_CONCURRENTSEVICE_INCLUDE_CONCURRENT_TASK_TYPE_H
17 #define CONCURRENT_TASK_SERVICES_CONCURRENTSEVICE_INCLUDE_CONCURRENT_TASK_TYPE_H
18 namespace OHOS {
19 namespace ConcurrentTask {
20 constexpr int MAX_KEY_THREADS = 5;
21 
22 enum MsgType {
23     MSG_FOREGROUND = 0,
24     MSG_BACKGROUND,
25     MSG_APP_START,
26     MSG_APP_KILLED,
27     MSG_CONTINUOUS_TASK_START,
28     MSG_CONTINUOUS_TASK_END,
29     MSG_GET_FOCUS,
30     MSG_LOSE_FOCUS,
31     MSG_ENTER_INTERACTION_SCENE,
32     MSG_EXIT_INTERACTION_SCENE,
33     MSG_SYSTEM_MAX,
34     MSG_APP_START_TYPE = 100,
35     MSG_REG_RENDER = MSG_APP_START_TYPE,
36     MSG_REG_UI,
37     MSG_REG_KEY_THERAD,
38     MSG_TYPE_MAX
39 };
40 
41 enum PrioType {
42     PRIO_RT = 0,
43     RPIO_IN = 1,
44     PRIO_NORMAL = 2,
45 };
46 
47 enum QueryIntervalItem {
48     QUERY_UI = 0,
49     QUERY_RENDER = 1,
50     QUERY_RENDER_SERVICE = 2,
51     QUERY_COMPOSER = 3,
52     QUERY_HARDWARE = 4,
53     QUERY_EXECUTOR_START = 5,
54     QUERY_RENDER_SERVICE_MAIN = 6,
55     QUERY_RENDER_SERVICE_RENDER = 7,
56     QURRY_TYPE_MAX,
57 };
58 
59 enum DeadlineType {
60     DDL_RATE = 0,
61     MSG_GAME = 1,
62 };
63 
64 struct IntervalReply {
65     int rtgId;
66     int tid;
67     int paramA;
68     int paramB;
69     std::string bundleName;
70 };
71 
72 struct DeadlineReply {
73     bool setStatus;
74 };
75 
76 enum GameStatus {
77     GAME_ENTRY_MSG = 0,
78     GAME_EXIT_MSG,
79     GAME_GTX_MSG,
80     CAMERA_ENTRY_MSG,
81     CAMERA_EXIT_MSG,
82     STATUS_MSG_MAX
83 };
84 }
85 }
86 #endif // CONCURRENT_TASK_SERVICES_CONCURRENTSEVICE_INCLUDE_CONCURRENT_TASK_TYPE_H
87