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