• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2025 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 = 10;
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 AudioDeadlineType {
65     AUDIO_DDL_CREATE_GRP = 0,
66     AUDIO_DDL_DESTROY_GRP,
67     AUDIO_DDL_ADD_THREAD,
68     AUDIO_DDL_REMOVE_THREAD,
69 };
70 
71 enum DeadlineType {
72     DDL_RATE = 0,
73     MSG_GAME = 1,
74 };
75 
76 struct IntervalReply {
77     int rtgId;
78     int tid;
79     int paramA;
80     int paramB;
81     std::string bundleName;
82 };
83 
84 struct DeadlineReply {
85     bool setStatus;
86 };
87 
88 enum GameStatus {
89     GAME_ENTRY_MSG = 0,
90     GAME_EXIT_MSG,
91     GAME_GTX_MSG,
92     CAMERA_ENTRY_MSG,
93     CAMERA_EXIT_MSG,
94     STATUS_MSG_MAX
95 };
96 }
97 }
98 #endif // CONCURRENT_TASK_SERVICES_CONCURRENTSEVICE_INCLUDE_CONCURRENT_TASK_TYPE_H
99